本文整理汇总了PHP中OC_User::deleteUser方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_User::deleteUser方法的具体用法?PHP OC_User::deleteUser怎么用?PHP OC_User::deleteUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_User
的用法示例。
在下文中一共展示了OC_User::deleteUser方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tearDownAfterClass
public static function tearDownAfterClass()
{
// cleanup test user
\OC_User::deleteUser(self::TEST_ENCRYPTION_HOOKS_USER1);
\OC_User::deleteUser(self::TEST_ENCRYPTION_HOOKS_USER2);
parent::tearDownAfterClass();
}
示例2: tearDownAfterClass
public static function tearDownAfterClass()
{
// cleanup users
\OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER1);
\OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER2);
\OC_User::deleteUser(self::TEST_FILES_SHARING_API_USER3);
}
示例3: tearDown
protected function tearDown()
{
$result = \OC_User::deleteUser(self::$user);
$this->assertTrue($result);
$this->logout();
parent::tearDown();
}
示例4: setUp
public function setUp()
{
if (!getenv('RUN_OBJECTSTORE_TESTS')) {
$this->markTestSkipped('objectstore tests are unreliable on travis');
}
\OC_App::disable('files_sharing');
\OC_App::disable('files_versions');
// reset backend
\OC_User::clearBackends();
\OC_User::useBackend('database');
// create users
$users = array('test');
foreach ($users as $userName) {
\OC_User::deleteUser($userName);
\OC_User::createUser($userName, $userName);
}
// main test user
$userName = 'test';
\OC_Util::tearDownFS();
\OC_User::setUserId('');
\OC\Files\Filesystem::tearDown();
\OC_User::setUserId('test');
$testContainer = 'oc-test-container-' . substr(md5(rand()), 0, 7);
$params = array('username' => 'facebook100000330192569', 'password' => 'Dbdj1sXnRSHxIGc4', 'container' => $testContainer, 'autocreate' => true, 'region' => 'RegionOne', 'url' => 'http://8.21.28.222:5000/v2.0', 'tenantName' => 'facebook100000330192569', 'serviceName' => 'swift', 'user' => \OC_User::getManager()->get($userName));
$this->objectStorage = new ObjectStoreToTest($params);
$params['objectstore'] = $this->objectStorage;
$this->instance = new ObjectStoreStorage($params);
}
示例5: tearDownAfterClass
public static function tearDownAfterClass()
{
// cleanup test user
\OC_User::deleteUser(self::TEST_VERSIONS_USER);
\OC_User::deleteUser(self::TEST_VERSIONS_USER2);
parent::tearDownAfterClass();
}
示例6: tearDownAfterClass
public static function tearDownAfterClass()
{
// cleanup test user
\OC_User::deleteUser(self::TEST_ENCRYPTION_TRASHBIN_USER1);
\OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
parent::tearDownAfterClass();
}
示例7: tearDownAfterClass
public static function tearDownAfterClass()
{
\OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER1);
\OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER2);
\OC_User::deleteUser(self::TEST_ENCRYPTION_MIGRATION_USER3);
parent::tearDownAfterClass();
}
示例8: tearDownAfterClass
public static function tearDownAfterClass()
{
// cleanup test user
\OC_User::deleteUser(\Test_Encryption_Helper::TEST_ENCRYPTION_HELPER_USER1);
\OC_User::deleteUser(\Test_Encryption_Helper::TEST_ENCRYPTION_HELPER_USER2);
\OC_Hook::clear();
\OC_FileProxy::clearProxies();
}
示例9: tearDown
protected function tearDown()
{
\OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin');
$this->logout();
\OC_User::deleteUser($this->user);
\OC_Hook::clear();
parent::tearDown();
}
示例10: tearDown
protected function tearDown()
{
$result = \OC_User::deleteUser(self::$user);
$this->assertTrue($result);
\OC\Files\Filesystem::tearDown();
\OC\Files\Filesystem::mount($this->originalStorage, array(), '/');
parent::tearDown();
}
示例11: testDeleteUser
public function testDeleteUser()
{
$fail = \OC_User::deleteUser('victim');
$this->assertFalse($fail);
$success = \OC_User::createUser('victim', 'password');
$success = \OC_User::deleteUser('victim');
$this->assertTrue($success);
}
示例12: tearDown
protected function tearDown()
{
foreach ($this->users as $user) {
\OC_User::deleteUser($user);
}
\OC_Group::deleteGroup('admin');
parent::tearDown();
}
示例13: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$wasSuccessful = \OC_User::deleteUser($input->getArgument('uid'));
if ($wasSuccessful === true) {
$output->writeln('The specified user was deleted');
return;
}
$output->writeln('<error>The specified could not be deleted. Please check the logs.</error>');
}
示例14: tearDown
public function tearDown()
{
$userId = OCA_mozilla_sync\User::userHashToId($this->userHash);
if ($userId != false) {
OCA_mozilla_sync\User::deleteUser($userId);
}
OC_Preferences::deleteUser($this->userName);
OC_User::deleteUser($this->userName);
}
示例15: tearDown
public function tearDown()
{
$userId = OCA_mozilla_sync\User::userHashToId($this->userHash);
if ($userId != false) {
OCA_mozilla_sync\User::deleteUser($userId);
}
\OC::$server->getConfig()->deleteAllUserValues($this->userName);
OC_User::deleteUser($this->userName);
}