Commit 30d0b10c99fcc3c20b956fa0ebb3d49f71d7fadf
1 parent
97e8c35f
fix: 修复被禁用的账户可以通过短信验证码再次登录的问题
(cherry picked from commit fcfd68ac1c979374d0916ed87995030c465e9428)
Showing
1 changed file
with
6 additions
and
0 deletions
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/auth/MemberAuthServiceImpl.java
| ... | ... | @@ -88,6 +88,12 @@ public class MemberAuthServiceImpl implements MemberAuthService { |
| 88 | 88 | MemberUserDO user = userService.createUserIfAbsent(reqVO.getMobile(), userIp, getTerminal()); |
| 89 | 89 | Assert.notNull(user, "获取用户失败,结果为空"); |
| 90 | 90 | |
| 91 | + // 校验是否禁用 | |
| 92 | + if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) { | |
| 93 | + createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED); | |
| 94 | + throw exception(AUTH_LOGIN_USER_DISABLED); | |
| 95 | + } | |
| 96 | + | |
| 91 | 97 | // 如果 socialType 非空,说明需要绑定社交用户 |
| 92 | 98 | String openid = null; |
| 93 | 99 | if (reqVO.getSocialType() != null) { | ... | ... |