fix: ldap登录如果配置允许coverAttributes,会导致panic (#454)
fix #453 Signed-off-by: ysicing <i@ysicing.me>
This commit is contained in:
parent
36e119770a
commit
2e7a2a07ac
|
@ -112,7 +112,7 @@ func LdapLogin(user, pass string) (*User, error) {
|
|||
if has {
|
||||
if config.Config.LDAP.CoverAttributes {
|
||||
_, err := DB["rdb"].Where("id=?", u.Id).Update(u)
|
||||
return nil, err
|
||||
return &u, err
|
||||
} else {
|
||||
return &u, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue