Ejemplo n.º 1
0
 public User RegisterNewUser(Register regModel)
 {
     var cryptedPassword = new Crypto().Encrypt(regModel.Password);
     var newUser = new User { Email = regModel.Email, PasswordCrypted = cryptedPassword, UserName = regModel.Name };
     Save(newUser);
     return newUser;
 }
Ejemplo n.º 2
0
 public static bool IsPasswordOK(string password, User user)
 {
     var cryptedPassword = new Crypto().Encrypt(password);
     return cryptedPassword.Equals(user.PasswordCrypted);
 }