예제 #1
0
 /// <summary>
 /// Loads the specified database.
 /// </summary>
 /// <param name="database">The database.</param>
 /// <returns></returns>
 public User Load(UserAccountsDatabase database)
 {
     if (!string.IsNullOrEmpty(Uuid))
     {
         return(User.FirstOneWhere(u => u.Uuid == Uuid, database));
     }
     if (!string.IsNullOrEmpty(Email))
     {
         return(User.FirstOneWhere(u => u.Email == Email, database));
     }
     return(User.FirstOneWhere(u => u.UserName == UserName, database));
 }
예제 #2
0
 public DaoAuthenticator(UserAccountsDatabase db)
 {
     UserAccountsDatabase = db;
 }
예제 #3
0
 public UserManager(UserAccountsDatabase db) : this()
 {
     Database = db;
 }