public string ResetPassword() { string newPassword = "******".RandomLetters(7); Password.Set(UserName, newPassword); return(newPassword); }
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); }
public void SetPassword(string password) { Password.Set(UserName, password); }