Beispiel #1
0
        public int GetAccountID(AccountDTO account)
        {
            AccountDTO temp = new AccountDTO(account.Id, account.Email, account.NickName, account.Password);

            temp.Password = CreateHashedString(account.Password);
            return(Account.Get(temp).Id);
        }
Beispiel #2
0
 public AccountDTO LogIn(AccountDTO Login)
 {
     if (MatchingEmails(Login.Id, Login.Email))
     {
         if (CheckPasswords(Login))
         {
             //return positive login back
             Login.Password = Convert.CreateHashedString(Login.Password);
             Login.NickName = Account.Get(Login).NickName;
             Login.Email    = Convert.CreateHashedString(Login.Email);
             return(Login);
         }
     }
     //else return negative login back
     return(null);
 }