예제 #1
0
        public User CreateNewUser(string username, string emailaddress, string password)
        {
            AuthUser au       = new AuthUser(db);
            string   passHash = au.GetHashedString(password);

            string verifyhash = Utils.Encryption.Encryption.HashString(username);

            User newUser = new User()
            {
                Username          = username,
                EmailAddress      = emailaddress,
                PasswordHash      = passHash,
                DateJoined        = UKTime.Now,
                SecurityStamp     = "",
                AccessFailedCount = 0,
                EmailVerified     = false,
                EmailVerifyHash   = verifyhash,
                LastLogin         = null
            };

            return(newUser);
        }