Update Auth.php

This commit is contained in:
邹景立 2021-02-24 10:35:14 +08:00
parent ae94f2b78d
commit c9c185f552

View File

@ -50,10 +50,9 @@ abstract class Auth extends Controller
}
// 获取用户数据
$this->user = $this->getUser();
if (empty($this->user) || empty($this->user['id'])) {
$this->uuid = $this->user['id'] ?? '';
if (empty($this->uuid)) {
$this->error('用户登录失败!', '{-null-}', 401);
} else {
$this->uuid = $this->user['id'];
}
}