refactor: 用户名或密码错误的时候显示信息修改
This commit is contained in:
parent
8699187673
commit
44152ef296
|
@ -105,7 +105,7 @@ public class ShiroDBRealm extends AuthorizingRealm {
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
msg = "The user does not exist: " + userId;
|
msg = "The user does not exist: " + userId;
|
||||||
logger.warn(msg);
|
logger.warn(msg);
|
||||||
throw new UnknownAccountException(Translator.get("password_is_incorrect") + userId);
|
throw new UnknownAccountException(Translator.get("password_is_incorrect"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
|
@ -119,7 +119,7 @@ public class ShiroDBRealm extends AuthorizingRealm {
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
msg = "The user does not exist: " + userId;
|
msg = "The user does not exist: " + userId;
|
||||||
logger.warn(msg);
|
logger.warn(msg);
|
||||||
throw new UnknownAccountException(Translator.get("password_is_incorrect") + userId);
|
throw new UnknownAccountException(Translator.get("password_is_incorrect"));
|
||||||
}
|
}
|
||||||
userId = user.getId();
|
userId = user.getId();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue