コード例 #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;
 }