Merge pull request #11499 from owncloud/ldap-warningwhenuidismissing

Log warning when no uid was found for user
This commit is contained in:
Lukas Reschke 2014-10-10 12:42:31 +02:00
commit 4a4ea1dae9
1 changed files with 4 additions and 0 deletions

View File

@ -283,6 +283,10 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
$uid = $userDN; $uid = $userDN;
} else if(strtolower($this->access->connection->ldapGroupMemberAssocAttr) === 'memberuid') { } else if(strtolower($this->access->connection->ldapGroupMemberAssocAttr) === 'memberuid') {
$result = $this->access->readAttribute($userDN, 'uid'); $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]; $uid = $result[0];
} else { } else {
// just in case // just in case