Exemple #1
0
        private bool Register(LoginRegisterData data)
        {
            Register register = new Register(data.UserName, data.Password);

            if (data.Password != data.ConfirmPassword || !register.CheckUserNameIsFree())
            {
                return(false);
            }
            register.InsertNewUser();
            return(true);
        }
Exemple #2
0
 public bool Validate(LoginRegisterData data)
 {
     return(data.NewUser ? Register(data) : LogIn(data));
 }
Exemple #3
0
        private bool LogIn(LoginRegisterData data)
        {
            LogIn login = new LogIn(data.UserName);

            return(login.ValidatePassword(data.Password));
        }