mirror of
https://github.com/friendica/friendica
synced 2025-04-26 11:10:11 +00:00
Move PConfig::set() to DI::pConfig()->set()
This commit is contained in:
parent
9e9429b56d
commit
88bb66371c
17 changed files with 68 additions and 82 deletions
|
@ -37,7 +37,7 @@ class Index extends BaseSettingsModule
|
|||
if (!$has_secret && !$verified) {
|
||||
$Google2FA = new Google2FA();
|
||||
|
||||
PConfig::set(local_user(), '2fa', 'secret', $Google2FA->generateSecretKey(32));
|
||||
DI::pConfig()->set(local_user(), '2fa', 'secret', $Google2FA->generateSecretKey(32));
|
||||
|
||||
DI::baseUrl()->redirect('settings/2fa/recovery?t=' . self::getFormSecurityToken('settings_2fa_password'));
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ class Verify extends BaseSettingsModule
|
|||
$valid = $google2fa->verifyKey(DI::pConfig()->get(local_user(), '2fa', 'secret'), $_POST['verify_code'] ?? '');
|
||||
|
||||
if ($valid) {
|
||||
PConfig::set(local_user(), '2fa', 'verified', true);
|
||||
DI::pConfig()->set(local_user(), '2fa', 'verified', true);
|
||||
Session::set('2fa', true);
|
||||
|
||||
notice(L10n::t('Two-factor authentication successfully activated.'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue