Beispiel #1
0
 /// <summary>
 /// Check the Database to make sure user exists.
 /// </summary>
 /// <param name="user"></param>
 /// <param name="password"></param>
 /// <returns>True if exists, false if doesn't</returns>
 public bool AuthenticateUser(string encrypteduser, string encryptedpassword)
 {
     UserDB db = new UserDB();
     return db.userExists(encrypteduser, encryptedpassword);
 }
Beispiel #2
0
 /// <summary>
 /// Get the role of the user from the db
 /// </summary>
 /// <param name="encrypteduser"></param>
 /// <param name="encryptedpassword"></param>
 /// <returns></returns>
 public string getRole(string encrypteduser, string encryptedpassword)
 {
     UserDB db = new UserDB();
     if (db.userExists(encrypteduser, encryptedpassword))
         return db.getRole(encrypteduser, encryptedpassword);
     return null;
 }