mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 10:56:08 +01:00
Fixed broken 2FA login when site is not configured to use Flex Users [#2109]
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
## mm/dd/2021
|
## mm/dd/2021
|
||||||
|
|
||||||
1. [](#bugfix)
|
1. [](#bugfix)
|
||||||
* Fixed `You have been logged out` message when entering to 2FA authentication due to `/admin/task:getNotifications` AJAX call [#2109](https://github.com/getgrav/grav-plugin-admin/issues/2109)
|
* Fixed `You have been logged out` message when entering to 2FA authentication due to `/admin/task:getNotifications` AJAX call
|
||||||
|
* Fixed broken 2FA login when site is not configured to use Flex Users [#2109](https://github.com/getgrav/grav-plugin-admin/issues/2109)
|
||||||
|
|
||||||
# v1.10.10
|
# v1.10.10
|
||||||
## 04/07/2021
|
## 04/07/2021
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
namespace Grav\Plugin\Admin\Controllers\Login;
|
namespace Grav\Plugin\Admin\Controllers\Login;
|
||||||
|
|
||||||
use Grav\Common\Debugger;
|
use Grav\Common\Debugger;
|
||||||
|
use Grav\Common\Grav;
|
||||||
use Grav\Common\Page\Pages;
|
use Grav\Common\Page\Pages;
|
||||||
use Grav\Common\Uri;
|
use Grav\Common\Uri;
|
||||||
use Grav\Common\User\Interfaces\UserCollectionInterface;
|
use Grav\Common\User\Interfaces\UserCollectionInterface;
|
||||||
@@ -298,7 +299,7 @@ class LoginController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Successful 2FA, authorize user and redirect.
|
// Successful 2FA, authorize user and redirect.
|
||||||
$user->authorized = true;
|
Grav::instance()['user']->authorized = true;
|
||||||
|
|
||||||
Admin::DEBUG && Admin::addDebugMessage('Admin login: 2FA check succeeded, authorize user and redirect');
|
Admin::DEBUG && Admin::addDebugMessage('Admin login: 2FA check succeeded, authorize user and redirect');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user