|
@@ -43,24 +43,24 @@ namespace ERP.Core.Service
|
|
|
throw new Exception(string.Format(_localizer["User.NotExist"], loginName));
|
|
|
}
|
|
|
|
|
|
- //CheckUserStatus(user);
|
|
|
+ CheckUserStatus(user);
|
|
|
|
|
|
CheckLogin(securityConfig, password, user);
|
|
|
|
|
|
return new LoginUser();
|
|
|
}
|
|
|
|
|
|
- //private void CheckUserStatus(SysUser user)
|
|
|
- //{
|
|
|
- // if (user.UserStatus == StatusEnum.Enable)
|
|
|
- // {
|
|
|
- // return;
|
|
|
- // }
|
|
|
- // else if (user.UserStatus == StatusEnum.Disable)
|
|
|
- // {
|
|
|
- // throw new Exception(string.Format(_localizer["User.Bloked"], user.UserName));
|
|
|
- // }
|
|
|
- //}
|
|
|
+ private void CheckUserStatus(SysUser user)
|
|
|
+ {
|
|
|
+ if (user.UserStatus == StatusEnum.Enable)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ else if (user.UserStatus == StatusEnum.Disable)
|
|
|
+ {
|
|
|
+ throw new Exception(string.Format(_localizer["User.Bloked"], user.UserName));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
private void CheckLogin(SecurityConfig securityConfig, string password, SysUser loginUser)
|
|
|
{
|