summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-16 13:27:45 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-16 18:39:11 +0100
commit55532f19d90b40f7f46354b92a5322676729ba7e (patch)
treec29ee88dbb789c7c0aa9c9f1c08fccef27272d7f /apps/user_ldap/lib
parenta159d7c28c483a2b77e2f533795f6d6d1ec720fd (diff)
downloadnextcloud-server-55532f19d90b40f7f46354b92a5322676729ba7e.tar.gz
nextcloud-server-55532f19d90b40f7f46354b92a5322676729ba7e.zip
Cleanup OC_User and OCP\User
* mainly removes deprecated methods and old static code Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/Access.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index b84f5a38b31..43feeb4c1f0 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -588,7 +588,7 @@ class Access extends LDAPUtility implements IUserTools {
// outside of core user management will still cache the user as non-existing.
$originalTTL = $this->connection->ldapCacheTTL;
$this->connection->setConfiguration(array('ldapCacheTTL' => 0));
- if(($isUser && $intName !== '' && !\OCP\User::userExists($intName))
+ if(($isUser && $intName !== '' && !\OC::$server->getUserManager()->userExists($intName))
|| (!$isUser && !\OC::$server->getGroupManager()->groupExists($intName))) {
if($mapper->map($fdn, $intName, $uuid)) {
$this->connection->setConfiguration(array('ldapCacheTTL' => $originalTTL));
@@ -721,7 +721,7 @@ class Access extends LDAPUtility implements IUserTools {
//20 attempts, something else is very wrong. Avoids infinite loop.
while($attempts < 20){
$altName = $name . '_' . rand(1000,9999);
- if(!\OCP\User::userExists($altName)) {
+ if(!\OC::$server->getUserManager()->userExists($altName)) {
return $altName;
}
$attempts++;