本文整理汇总了PHP中OC_Preferences::deleteAppFromAllUsers方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_Preferences::deleteAppFromAllUsers方法的具体用法?PHP OC_Preferences::deleteAppFromAllUsers怎么用?PHP OC_Preferences::deleteAppFromAllUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_Preferences
的用法示例。
在下文中一共展示了OC_Preferences::deleteAppFromAllUsers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testDeleteAppFromAllUsers
public function testDeleteAppFromAllUsers()
{
$this->assertTrue(\OC_Preferences::deleteAppFromAllUsers('someapp'));
$query = \OC_DB::prepare('SELECT `configvalue` FROM `*PREFIX*preferences` WHERE `appid` = ?');
$result = $query->execute(array('someapp'));
$this->assertEquals(0, count($result->fetchAll()));
}
示例2: preDisable
/**
* set migration status and the init status back to '0' so that all new files get encrypted
* if the app gets enabled again
* @param array $params contains the app ID
*/
public static function preDisable($params)
{
if ($params['app'] === 'files_encryption') {
\OC_Preferences::deleteAppFromAllUsers('files_encryption');
$session = new \OCA\Encryption\Session(new \OC\Files\View('/'));
$session->setInitialized(\OCA\Encryption\Session::NOT_INITIALIZED);
}
}