mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
change user checkIsNormal()
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
namespace App\Auth;
|
||||
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Auth\GuardHelpers;
|
||||
use Illuminate\Contracts\Auth\Authenticatable;
|
||||
@@ -46,14 +47,16 @@ class NexusWebGuard implements StatefulGuard
|
||||
}
|
||||
$credentials = $this->request->cookie();
|
||||
if ($this->validate($credentials)) {
|
||||
/**
|
||||
* @var User $user
|
||||
*/
|
||||
$user = $this->provider->retrieveByCredentials($credentials);
|
||||
if (empty($user)) {
|
||||
return null;
|
||||
}
|
||||
if ($this->provider->validateCredentials($user, $credentials)) {
|
||||
if ($user->checkIsNormal()) {
|
||||
return $this->user = $user;
|
||||
}
|
||||
$user->checkIsNormal();
|
||||
return $this->user = $user;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user