Esempio n. 1
0
        public Store()
        {
            Administrators = new List<User>();

            // Sets default password when created
            var passlen = 8;
            Common.Library.Security.PasswordGenerator pw = new Common.Library.Security.PasswordGenerator();
            pw.Maximum = passlen + 1;
            pw.Minimum = passlen;
            pw.RepeatCharacters = true;
            pw.ExcludeSymbols = true;
            Identifier = pw.Generate().ToUpper();
        }
Esempio n. 2
0
        public User()
        {
            UserAddress = new List<UserAddress>();
            //UserGroup = new List<Users.UserGroup>();

            FirstName = string.Empty;
            LastName = string.Empty;
            Email = string.Empty;
            IsAdministrator = false;
            this.LatestLoggedinTime = DateTime.Now;

            // Sets default password and Hash it when created
            var passlen = Nicore.Foundation.Core.Settings.PasswordMaxLength;
            Common.Library.Security.PasswordGenerator pw = new Common.Library.Security.PasswordGenerator();
            pw.Maximum = passlen + 1;
            pw.Minimum = passlen;
            pw.RepeatCharacters = true;
            pw.ExcludeSymbols = true;
            Password = Common.Library.Security.PasswordHash.CreateHash(pw.Generate());
        }