mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-02 12:09:13 +08:00
fix(系统设置): LDAP用户首次登录系统失败
--bug=1018387 --user=李玉号 【系统设置】LDAP用户首次登录系统失败,再次登录成,但是页面显示需要优化 https://www.tapd.cn/55049933/s/1267896
This commit is contained in:
parent
6c2a01d419
commit
111505f77d
@ -98,7 +98,7 @@ public class LdapService {
|
||||
}
|
||||
|
||||
user.setSource(UserSource.LDAP.name());
|
||||
userLoginService.addLdapUser(user);
|
||||
u = userLoginService.addLdapUser(user);
|
||||
} else {
|
||||
// 更新
|
||||
u.setName(name);
|
||||
|
@ -332,12 +332,13 @@ public class UserLoginService {
|
||||
userMapper.insertSelective(user);
|
||||
}
|
||||
|
||||
public void addLdapUser(User user) {
|
||||
public User addLdapUser(User user) {
|
||||
user.setCreateTime(System.currentTimeMillis());
|
||||
user.setUpdateTime(System.currentTimeMillis());
|
||||
user.setStatus(UserStatus.NORMAL);
|
||||
checkEmailIsExist(user.getEmail());
|
||||
userMapper.insertSelective(user);
|
||||
return user;
|
||||
}
|
||||
|
||||
private void checkEmailIsExist(String email) {
|
||||
|
Loading…
Reference in New Issue
Block a user