Исправлено создание учетки

This commit is contained in:
Gitea 2022-08-18 09:50:52 +10:00
parent 897e3bce74
commit 38c25d6e8f

View File

@ -109,10 +109,8 @@ namespace DiIiS_NA.LoginServer.AccountsSystem
public static Account GetAccountByEmail(string email) public static Account GetAccountByEmail(string email)
{ {
//Logger.Debug("trying GetAccountByEmail {0}", email); if (LoadedAccounts.Any(a => a.Value.Email.ToLower() == email.ToLower()))
email = email.ToLower(); return LoadedAccounts[LoadedAccounts.Single(a => a.Value.Email.ToLower() == email.ToLower()).Key];
if (LoadedAccounts.Any(a => a.Value.Email == email))
return LoadedAccounts[LoadedAccounts.Single(a => a.Value.Email == email).Key];
else else
{ {
List<DBAccount> dbAcc = DBSessions.SessionQueryWhere<DBAccount>(dba => dba.Email == email); List<DBAccount> dbAcc = DBSessions.SessionQueryWhere<DBAccount>(dba => dba.Email == email);