mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
fix NexusWebGuard
This commit is contained in:
@@ -47,6 +47,9 @@ class NexusWebGuard implements StatefulGuard
|
|||||||
$credentials = $this->request->cookie();
|
$credentials = $this->request->cookie();
|
||||||
if ($this->validate($credentials)) {
|
if ($this->validate($credentials)) {
|
||||||
$user = $this->provider->retrieveByCredentials($credentials);
|
$user = $this->provider->retrieveByCredentials($credentials);
|
||||||
|
if (empty($user)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if ($this->provider->validateCredentials($user, $credentials)) {
|
if ($this->provider->validateCredentials($user, $credentials)) {
|
||||||
if ($user->checkIsNormal()) {
|
if ($user->checkIsNormal()) {
|
||||||
return $this->user = $user;
|
return $this->user = $user;
|
||||||
|
|||||||
Reference in New Issue
Block a user