|
@@ -158,7 +158,7 @@ public class SysLoginService {
|
|
|
}
|
|
|
|
|
|
SysUser user = userService.selectUserByUserName(username);
|
|
|
- if (user.getExpand() != null) {
|
|
|
+ if (user != null && user.getExpand() != null) {
|
|
|
//验证是否允许登录的IP
|
|
|
if (StringUtils.isNotEmpty(user.getExpand().getLoginIp())) {
|
|
|
if (!IpUtils.isMatchedIp(user.getExpand().getLoginIp(), IpUtils.getIpAddr())) {
|