fix user token

This commit is contained in:
Jicheng Lu 2024-07-01 14:53:24 -05:00
parent 30a15adb40
commit 161e8af36c

View file

@ -96,10 +96,13 @@ public class UserService : IUserService
}
//verify password is correct or not.
var hashPassword = Utilities.HashTextMd5($"{password}{record.Salt}");
if (hashPassword != record.Password)
if (record != null)
{
return default;
var hashPassword = Utilities.HashTextMd5($"{password}{record.Salt}");
if (hashPassword != record.Password)
{
return default;
}
}
User? user = record;