fix: login bug
This commit is contained in:
parent
ea424b197a
commit
9a1cf696a2
|
|
@ -213,10 +213,10 @@ public class UserService : IUserService
|
|||
var (id, password) = base64.SplitAsTuple(":");
|
||||
|
||||
var db = _services.GetRequiredService<IBotSharpRepository>();
|
||||
var record = id.Contains("@") ? db.GetUserByEmail(id) : db.GetUserByPhone(id);
|
||||
var record = id.Contains("@") ? db.GetUserByEmail(id) : db.GetUserByUserName(id);
|
||||
if (record == null)
|
||||
{
|
||||
record = db.GetUserByUserName(id);
|
||||
record = db.GetUserByPhone(id);
|
||||
}
|
||||
|
||||
if (record != null && record.Type == UserType.Affiliate)
|
||||
|
|
|
|||
Loading…
Reference in a new issue