Fixed broken 2FA login when site is not configured to use Flex Users [#2109]

This commit is contained in:
Matias Griese
2021-04-08 10:56:18 +03:00
parent 6db7e4a637
commit 9108a4a85f
2 changed files with 4 additions and 2 deletions

View File

@@ -2,7 +2,8 @@
## mm/dd/2021
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
## 04/07/2021

View File

@@ -10,6 +10,7 @@
namespace Grav\Plugin\Admin\Controllers\Login;
use Grav\Common\Debugger;
use Grav\Common\Grav;
use Grav\Common\Page\Pages;
use Grav\Common\Uri;
use Grav\Common\User\Interfaces\UserCollectionInterface;
@@ -298,7 +299,7 @@ class LoginController extends AdminController
}
// 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');