Beispiel #1
0
 public User login(string username, string password, LoginValidtion loginValidtion)
 {
     if (loginValidtion.validateUserData(username, password))
     {
         return(UserManager.getInstance().getUserByUsername(username));
     }
     return(null);
 }
Beispiel #2
0
 public void register(string username, string password, UserRoles role, LoginValidtion loginValidation)
 {
     if (loginValidation.validateUserData(username, password))
     {
         User user = new User(username, password);
         user.setUserRole(role);
         UserManager.getInstance().addUser(ref user);
     }
 }
 public static LoginValidtion newInstace(ActionOnError listner){
     LoginValidtion loginValidtion  = new LoginValidtion(listner);
     return loginValidtion;
 }