summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/user_ldap.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-07-30 17:42:33 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-07-30 17:42:33 +0200
commitb465fc84ae9fd1f678ce8cf1bd0c5a91d3665a05 (patch)
tree24bbe60e8ff5d927e81aebc5072bc419cbc455ce /apps/user_ldap/user_ldap.php
parentfa62ff62d2e48bee72aaf5b7d306abe77d90308b (diff)
downloadnextcloud-server-b465fc84ae9fd1f678ce8cf1bd0c5a91d3665a05.tar.gz
nextcloud-server-b465fc84ae9fd1f678ce8cf1bd0c5a91d3665a05.zip
LDAP: don't die on unexpected collisions, handle empty display-name attributes properly
Diffstat (limited to 'apps/user_ldap/user_ldap.php')
-rw-r--r--apps/user_ldap/user_ldap.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 57b2ef489ba..2059d5b0c6d 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -79,12 +79,19 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
return false;
}
- //update some settings, if necessary
- $this->updateQuota($dn);
- $this->updateEmail($dn);
+ //do we have a username for him/her?
+ $ocname = $this->dn2username($dn);
- //give back the display name
- return $this->dn2username($dn);
+ if($ocname){
+ //update some settings, if necessary
+ $this->updateQuota($dn);
+ $this->updateEmail($dn);
+
+ //give back the display name
+ return $ocname;
+ }
+
+ return false;
}
/**