summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/user_ldap.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/user_ldap.php')
-rw-r--r--apps/user_ldap/user_ldap.php25
1 files changed, 17 insertions, 8 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 7778c37c794..44a19478598 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -112,7 +112,8 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
return $ldap_users;
}
- // if we'd pass -1 to LDAP search, we'd end up in a Protocol error. With a limit of 0, we get 0 results. So we pass null.
+ // if we'd pass -1 to LDAP search, we'd end up in a Protocol
+ // error. With a limit of 0, we get 0 results. So we pass null.
if($limit <= 0) {
$limit = null;
}
@@ -121,9 +122,12 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
$this->getFilterPartForUserSearch($search)
));
- \OCP\Util::writeLog('user_ldap', 'getUsers: Options: search '.$search.' limit '.$limit.' offset '.$offset.' Filter: '.$filter, \OCP\Util::DEBUG);
+ \OCP\Util::writeLog('user_ldap',
+ 'getUsers: Options: search '.$search.' limit '.$limit.' offset '.$offset.' Filter: '.$filter,
+ \OCP\Util::DEBUG);
//do the search and translate results to owncloud names
- $ldap_users = $this->fetchListOfUsers($filter, array($this->connection->ldapUserDisplayName, 'dn'), $limit, $offset);
+ $ldap_users = $this->fetchListOfUsers($filter, array($this->connection->ldapUserDisplayName, 'dn'),
+ $limit, $offset);
$ldap_users = $this->ownCloudUserNames($ldap_users);
\OCP\Util::writeLog('user_ldap', 'getUsers: '.count($ldap_users). ' Users found', \OCP\Util::DEBUG);
@@ -189,11 +193,13 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
//check for / at the beginning or pattern c:\ resp. c:/
if(
'/' == $path[0]
- || (3 < strlen($path) && ctype_alpha($path[0]) && $path[1] == ':' && ('\\' == $path[2] || '/' == $path[2]))
+ || (3 < strlen($path) && ctype_alpha($path[0])
+ && $path[1] == ':' && ('\\' == $path[2] || '/' == $path[2]))
) {
$homedir = $path;
} else {
- $homedir = \OCP\Config::getSystemValue('datadirectory', \OC::$SERVERROOT.'/data' ) . '/' . $homedir[0];
+ $homedir = \OCP\Config::getSystemValue('datadirectory',
+ \OC::$SERVERROOT.'/data' ) . '/' . $homedir[0];
}
$this->connection->writeToCache($cacheKey, $homedir);
return $homedir;
@@ -221,7 +227,7 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
$this->connection->ldapUserDisplayName);
if($displayName && (count($displayName) > 0)) {
- $this->connection->writeToCache($cacheKey, $displayName);
+ $this->connection->writeToCache($cacheKey, $displayName[0]);
return $displayName[0];
}
@@ -258,7 +264,10 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
* compared with OC_USER_BACKEND_CREATE_USER etc.
*/
public function implementsActions($actions) {
- return (bool)((OC_USER_BACKEND_CHECK_PASSWORD | OC_USER_BACKEND_GET_HOME) & $actions);
+ return (bool)((OC_USER_BACKEND_CHECK_PASSWORD
+ | OC_USER_BACKEND_GET_HOME
+ | OC_USER_BACKEND_GET_DISPLAYNAME)
+ & $actions);
}
/**
@@ -267,4 +276,4 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
public function hasUserListings() {
return true;
}
-} \ No newline at end of file
+}