Example #1
0
        public string ResetPassword()
        {
            string newPassword = "******".RandomLetters(7);

            Password.Set(UserName, newPassword);
            return(newPassword);
        }
Example #2
0
        private static User Create(string userName, string email, string password, bool isApproved, Database db = null)
        {
            User user = new User();

            user.CreationDate = DateTime.UtcNow;
            user.UserName     = userName;
            user.Email        = email;
            user.IsApproved   = isApproved;
            user.IsDeleted    = false;
            user.Save(db);
            Password p = Password.Set(userName, password, db);

            return(user);
        }
Example #3
0
 public void SetPassword(string password)
 {
     Password.Set(UserName, password);
 }