diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-09-28 12:06:05 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-09-28 09:06:05 -0700 |
commit | 884cf494cbef36786cb035b14bbbccbb19c122c3 (patch) | |
tree | 9acb78bc62247de6f8f3375a4eecd483992fae5b | |
parent | 15b361094a64fe024db6d3eaf9539143cee73ce4 (diff) | |
download | chat-884cf494cbef36786cb035b14bbbccbb19c122c3.tar.gz chat-884cf494cbef36786cb035b14bbbccbb19c122c3.tar.bz2 chat-884cf494cbef36786cb035b14bbbccbb19c122c3.zip |
Only check LDAP attributes if auth data set (#7530)
-rw-r--r-- | app/plugins.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/plugins.go b/app/plugins.go index 94a1bfd6f..2c87cee19 100644 --- a/app/plugins.go +++ b/app/plugins.go @@ -186,6 +186,10 @@ func (api *BuiltInPluginAPI) GetLdapUserAttributes(userId string, attributes []s return nil, err } + if user.AuthData == nil { + return map[string]string{}, nil + } + return api.app.Ldap.GetUserAttributes(*user.AuthData, attributes) } |