This commit is contained in:
Jan Schuppik 2025-07-31 09:49:55 +02:00
parent 535110c9e6
commit ce8e6f966d
3 changed files with 3 additions and 5 deletions

View File

@ -71,7 +71,7 @@ class AccountController extends Controller
}
}
// create a form to add and enable 2FA via TOTP
// form to add, remove, enable & disable 2FA via TOTP
if ( $user->can('user/two-factor-authentication') ) {
if (isset($_POST['enabled_2fa'])) {
@ -88,8 +88,6 @@ class AccountController extends Controller
)), $user));
}
// $db = Icinga::app()->;
// Totp::on()
$totpForm->handleRequest();
$this->view->totpForm = $totpForm;

View File

@ -34,7 +34,7 @@ class Challenge2FAForm extends LoginForm
'class' => 'autofocus content-centered',
'placeholder' => $this->translate('Please enter your 2FA code'),
'required' => true,
'autocomplete' => 'off',
'autocomplete' => 'off',
]
);

View File

@ -12,7 +12,7 @@ class Totp extends Model
*/
public function getTableName()
{
return 'icingaweb_totp';
return 'icingaweb_totp';
}
/**