summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2015-12-17 15:10:11 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2015-12-17 16:18:40 +0100
commit835911bce5cf8da9ce6d4021f0836b11d6b97d31 (patch)
treea2bdcfcb696b9142643bb7a9f5b93b68944c1191 /apps
parent7e44ea5da068bae204715e545b95c4852ad6283c (diff)
downloadnextcloud-server-835911bce5cf8da9ce6d4021f0836b11d6b97d31.tar.gz
nextcloud-server-835911bce5cf8da9ce6d4021f0836b11d6b97d31.zip
Removed deprecated private OC_User::createUser
All function calls are replaced with the recommended (which was already the body of the function).
Diffstat (limited to 'apps')
-rw-r--r--apps/encryption/tests/lib/MigrationTest.php6
-rw-r--r--apps/files/tests/service/tagservice.php2
-rw-r--r--apps/files_sharing/tests/controller/sharecontroller.php2
-rw-r--r--apps/files_sharing/tests/testcase.php2
-rw-r--r--apps/files_trashbin/tests/trashbin.php2
5 files changed, 7 insertions, 7 deletions
diff --git a/apps/encryption/tests/lib/MigrationTest.php b/apps/encryption/tests/lib/MigrationTest.php
index fc3d014345b..ec1dccb87b8 100644
--- a/apps/encryption/tests/lib/MigrationTest.php
+++ b/apps/encryption/tests/lib/MigrationTest.php
@@ -43,9 +43,9 @@ class MigrationTest extends \Test\TestCase {
public static function setUpBeforeClass() {
parent::setUpBeforeClass();
- \OC_User::createUser(self::TEST_ENCRYPTION_MIGRATION_USER1, 'foo');
- \OC_User::createUser(self::TEST_ENCRYPTION_MIGRATION_USER2, 'foo');
- \OC_User::createUser(self::TEST_ENCRYPTION_MIGRATION_USER3, 'foo');
+ \OC::$server->getUserManager()->createUser(self::TEST_ENCRYPTION_MIGRATION_USER1, 'foo');
+ \OC::$server->getUserManager()->createUser(self::TEST_ENCRYPTION_MIGRATION_USER2, 'foo');
+ \OC::$server->getUserManager()->createUser(self::TEST_ENCRYPTION_MIGRATION_USER3, 'foo');
}
public static function tearDownAfterClass() {
diff --git a/apps/files/tests/service/tagservice.php b/apps/files/tests/service/tagservice.php
index 36da3edc61e..a34bd05afcc 100644
--- a/apps/files/tests/service/tagservice.php
+++ b/apps/files/tests/service/tagservice.php
@@ -54,7 +54,7 @@ class TagServiceTest extends \Test\TestCase {
protected function setUp() {
parent::setUp();
$this->user = $this->getUniqueId('user');
- \OC_User::createUser($this->user, 'test');
+ \OC::$server->getUserManager()->createUser($this->user, 'test');
\OC_User::setUserId($this->user);
\OC_Util::setupFS($this->user);
/**
diff --git a/apps/files_sharing/tests/controller/sharecontroller.php b/apps/files_sharing/tests/controller/sharecontroller.php
index 168488f5613..d165151b87f 100644
--- a/apps/files_sharing/tests/controller/sharecontroller.php
+++ b/apps/files_sharing/tests/controller/sharecontroller.php
@@ -78,7 +78,7 @@ class ShareControllerTest extends \Test\TestCase {
// Create a dummy user
$this->user = \OC::$server->getSecureRandom()->getLowStrengthGenerator()->generate(12, ISecureRandom::CHAR_LOWER);
- \OC_User::createUser($this->user, $this->user);
+ \OC::$server->getUserManager()->createUser($this->user, $this->user);
\OC_Util::tearDownFS();
$this->loginAsUser($this->user);
diff --git a/apps/files_sharing/tests/testcase.php b/apps/files_sharing/tests/testcase.php
index a74ee83c25b..cc82fc3d949 100644
--- a/apps/files_sharing/tests/testcase.php
+++ b/apps/files_sharing/tests/testcase.php
@@ -149,7 +149,7 @@ abstract class TestCase extends \Test\TestCase {
}
if ($create) {
- \OC_User::createUser($user, $password);
+ \OC::$server->getUserManager()->createUser($user, $password);
\OC_Group::createGroup('group');
\OC_Group::addToGroup($user, 'group');
}
diff --git a/apps/files_trashbin/tests/trashbin.php b/apps/files_trashbin/tests/trashbin.php
index db7e7e6e840..e8d586816c3 100644
--- a/apps/files_trashbin/tests/trashbin.php
+++ b/apps/files_trashbin/tests/trashbin.php
@@ -636,7 +636,7 @@ class Test_Trashbin extends \Test\TestCase {
public static function loginHelper($user, $create = false) {
if ($create) {
try {
- \OC_User::createUser($user, $user);
+ \OC::$server->getUserManager()->createUser($user, $user);
} catch(\Exception $e) { // catch username is already being used from previous aborted runs
}