summaryrefslogtreecommitdiffstats
path: root/app/plugins.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-09-28 12:06:05 -0400
committerCorey Hulen <corey@hulen.com>2017-09-28 09:06:05 -0700
commit884cf494cbef36786cb035b14bbbccbb19c122c3 (patch)
tree9acb78bc62247de6f8f3375a4eecd483992fae5b /app/plugins.go
parent15b361094a64fe024db6d3eaf9539143cee73ce4 (diff)
downloadchat-884cf494cbef36786cb035b14bbbccbb19c122c3.tar.gz
chat-884cf494cbef36786cb035b14bbbccbb19c122c3.tar.bz2
chat-884cf494cbef36786cb035b14bbbccbb19c122c3.zip
Only check LDAP attributes if auth data set (#7530)
Diffstat (limited to 'app/plugins.go')
-rw-r--r--app/plugins.go4
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)
}