Only check LDAP attributes if auth data set (#7530)

This commit is contained in:
Joram Wilander
2017-09-28 12:06:05 -04:00
committed by Corey Hulen
parent 15b361094a
commit 884cf494cb

View File

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