mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
[api] authenticate check is normal
This commit is contained in:
@@ -19,6 +19,7 @@ class AuthenticateRepository extends BaseRepository
|
||||
if (IS_PLATFORM_ADMIN && !$user->canAccessAdmin()) {
|
||||
throw new UnauthorizedException('Unauthorized!');
|
||||
}
|
||||
$user->checkIsNormal();
|
||||
$tokenName = __METHOD__ . __LINE__;
|
||||
$token = DB::transaction(function () use ($user, $tokenName) {
|
||||
$user->tokens()->delete();
|
||||
|
||||
Reference in New Issue
Block a user