Move PConfig::delete() to DI::pConfig()->delete()
This commit is contained in:
@@ -19,17 +19,4 @@ use Friendica\DI;
|
||||
*/
|
||||
class PConfig
|
||||
{
|
||||
/**
|
||||
* @brief Deletes the given key from the users's configuration.
|
||||
*
|
||||
* @param int $uid The user_id
|
||||
* @param string $cat The category of the configuration value
|
||||
* @param string $key The configuration key to delete
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function delete(int $uid, string $cat, string $key)
|
||||
{
|
||||
return DI::pConfig()->delete($uid, $cat, $key);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ class Index extends BaseSettingsModule
|
||||
case 'disable':
|
||||
if ($has_secret) {
|
||||
RecoveryCode::deleteForUser(local_user());
|
||||
PConfig::delete(local_user(), '2fa', 'secret');
|
||||
PConfig::delete(local_user(), '2fa', 'verified');
|
||||
DI::pConfig()->delete(local_user(), '2fa', 'secret');
|
||||
DI::pConfig()->delete(local_user(), '2fa', 'verified');
|
||||
Session::remove('2fa');
|
||||
|
||||
notice(L10n::t('Two-factor authentication successfully disabled.'));
|
||||
|
||||
Reference in New Issue
Block a user