Improve and fix issues with 2FA
This commit is contained in:
@@ -103,6 +103,9 @@ class RememberMe extends Base
|
|||||||
// Create the session
|
// Create the session
|
||||||
$this->userSession->refresh($this->user->getById($record['user_id']));
|
$this->userSession->refresh($this->user->getById($record['user_id']));
|
||||||
|
|
||||||
|
// Do not ask 2FA for remember me session
|
||||||
|
$this->session['2fa_validated'] = true;
|
||||||
|
|
||||||
$this->container['dispatcher']->dispatch(
|
$this->container['dispatcher']->dispatch(
|
||||||
'auth.success',
|
'auth.success',
|
||||||
new AuthEvent(self::AUTH_NAME, $this->userSession->getId())
|
new AuthEvent(self::AUTH_NAME, $this->userSession->getId())
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class Twofactor extends User
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Allow the user to test or disable the feature
|
// Allow the user to test or disable the feature
|
||||||
$this->session['user']['twofactor_activated'] = false;
|
$_SESSION['user']['twofactor_activated'] = false;
|
||||||
|
|
||||||
$this->session->flash(t('User updated successfully.'));
|
$this->session->flash(t('User updated successfully.'));
|
||||||
$this->response->redirect($this->helper->url('twofactor', 'index', array('user_id' => $user['id'])));
|
$this->response->redirect($this->helper->url('twofactor', 'index', array('user_id' => $user['id'])));
|
||||||
|
|||||||
Reference in New Issue
Block a user