aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/group_ldap.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-10-09 14:58:53 +0200
committerVincent Petry <pvince81@owncloud.com>2014-10-09 14:58:53 +0200
commit59f9107dd9497d2eb9bd61f5eb8d893dd8fcb766 (patch)
tree34569369b4dd6a1df8d262fbcc652dd3c6336cb1 /apps/user_ldap/group_ldap.php
parent0474a20ab9d21327a9fab8e463eb74b91a198c31 (diff)
downloadnextcloud-server-59f9107dd9497d2eb9bd61f5eb8d893dd8fcb766.tar.gz
nextcloud-server-59f9107dd9497d2eb9bd61f5eb8d893dd8fcb766.zip
Log warning when no uid was found for user
In some incomplete setups (like mine) it can happen that the uid attribute of users is missing. To be able to find out that something is wrong, a debug message is now logged when it has not been found.
Diffstat (limited to 'apps/user_ldap/group_ldap.php')
-rw-r--r--apps/user_ldap/group_ldap.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index 0d3a70575ba..48d097c3600 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -283,6 +283,10 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
$uid = $userDN;
} else if(strtolower($this->access->connection->ldapGroupMemberAssocAttr) === 'memberuid') {
$result = $this->access->readAttribute($userDN, 'uid');
+ if ($result === false) {
+ \OCP\Util::writeLog('user_ldap', 'No uid attribute found for DN ' . $userDN . ' on '.
+ $this->access->connection->ldapHost, \OCP\Util::DEBUG);
+ }
$uid = $result[0];
} else {
// just in case