mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-20 21:26:23 +01:00
25 lines
504 B
PHP
25 lines
504 B
PHP
<?php
|
|
defined('MYAAC') or die('Direct access not allowed!');
|
|
|
|
require __DIR__ . '/../base.php';
|
|
|
|
$account = \MyAAC\Models\Account::find($account_logged->getId());
|
|
if (!$account) {
|
|
error('Account not found!');
|
|
return;
|
|
}
|
|
|
|
if ($db->hasColumn('accounts', 'secret')) {
|
|
$account->secret = NULL;
|
|
}
|
|
|
|
$account->{'2fa_secret'} = '';
|
|
$account->save();
|
|
|
|
$twoFactorAuth->disable();
|
|
|
|
$twig->display('success.html.twig', [
|
|
'title' => 'Disabled',
|
|
'description' => 'Two Factor Authentication has been disabled.'
|
|
]);
|