More progress on 2fa

This commit is contained in:
Andy Miller
2017-08-26 18:36:17 -06:00
parent 8ca011dcd6
commit fff5091311
2 changed files with 7 additions and 1 deletions

View File

@@ -384,10 +384,12 @@ class Admin
$this->grav->redirect($this->base . '/twofa'); $this->grav->redirect($this->base . '/twofa');
} }
$user->authenticated = true;
if ($user->authorize('admin.login')) { if ($user->authorize('admin.login')) {
$user->authenticated = true;
$this->user = $this->session->user = $user; $this->user = $this->session->user = $user;

View File

@@ -710,6 +710,10 @@ class AdminController extends AdminBaseController
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.2FA_FAILED'), 'error'); $this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.2FA_FAILED'), 'error');
return true; return true;
} }
$user->authenticated = true;
$this->setRedirect($this->post['redirect']);
return true;
} }
/** /**