summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-03 01:24:27 -0600
committerMorris Jobke <hey@morrisjobke.de>2017-03-09 17:35:09 -0600
commita5ba1f78033b3ebe69c771fb33c1217a60494728 (patch)
treeb4bdf0ec562db9e91071eeef39f82586ce48eef4 /apps/user_ldap
parent6fd0e7e93995facfe75b26699ea462bb94fd03b9 (diff)
downloadnextcloud-server-a5ba1f78033b3ebe69c771fb33c1217a60494728.tar.gz
nextcloud-server-a5ba1f78033b3ebe69c771fb33c1217a60494728.zip
Remove legacy class OC_Group and OC_User
* basically a straight replacement of the wrapped code at the calling code parts Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/appinfo/app.php2
-rw-r--r--apps/user_ldap/lib/Access.php4
-rw-r--r--apps/user_ldap/tests/User_LDAPTest.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php
index 995b1226649..6f930ea39f0 100644
--- a/apps/user_ldap/appinfo/app.php
+++ b/apps/user_ldap/appinfo/app.php
@@ -58,7 +58,7 @@ if(count($configPrefixes) === 1) {
if(count($configPrefixes) > 0) {
// register user backend
OC_User::useBackend($userBackend);
- OC_Group::useBackend($groupBackend);
+ \OC::$server->getGroupManager()->addBackend($groupBackend);
}
\OCP\Util::connectHook(
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index cc0446ae523..ff95d96ebdb 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -570,7 +570,7 @@ class Access extends LDAPUtility implements IUserTools {
$originalTTL = $this->connection->ldapCacheTTL;
$this->connection->setConfiguration(array('ldapCacheTTL' => 0));
if(($isUser && !\OCP\User::userExists($intName))
- || (!$isUser && !\OC_Group::groupExists($intName))) {
+ || (!$isUser && !\OC::$server->getGroupManager()->groupExists($intName))) {
if($mapper->map($fdn, $intName, $uuid)) {
$this->connection->setConfiguration(array('ldapCacheTTL' => $originalTTL));
return $intName;
@@ -737,7 +737,7 @@ class Access extends LDAPUtility implements IUserTools {
// Check to be really sure it is unique
// while loop is just a precaution. If a name is not generated within
// 20 attempts, something else is very wrong. Avoids infinite loop.
- if(!\OC_Group::groupExists($altName)) {
+ if(!\OC::$server->getGroupManager()->groupExists($altName)) {
return $altName;
}
$altName = $name . '_' . ($lastNo + $attempts);
diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php
index 606eff4e7a7..f1a23f9a6c8 100644
--- a/apps/user_ldap/tests/User_LDAPTest.php
+++ b/apps/user_ldap/tests/User_LDAPTest.php
@@ -64,7 +64,7 @@ class User_LDAPTest extends TestCase {
parent::setUp();
\OC_User::clearBackends();
- \OC_Group::clearBackends();
+ \OC::$server->getGroupManager()->clearBackends();
}
/**