fix: ldap登录如果配置允许coverAttributes,会导致panic (#454)

fix #453

Signed-off-by: ysicing <i@ysicing.me>
This commit is contained in:
ysicing 2020-12-12 03:46:13 +08:00 committed by GitHub
parent 36e119770a
commit 2e7a2a07ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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
}