mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-14 17:26:10 +01:00
More progress on 2fa
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user