更新用户数据

This commit is contained in:
yaooo 2023-11-23 18:09:51 +08:00
parent 56918bc1fb
commit fd0e8b3322
4 changed files with 6 additions and 4 deletions

View File

@ -34,6 +34,7 @@ class BaseAdminController extends BaseLikeAdminController
if (isset($this->request->adminInfo) && $this->request->adminInfo) {
$this->adminInfo = $this->request->adminInfo;
$this->adminId = $this->request->adminInfo['admin_id'];
$this->userId = $this->request->adminInfo['user_id'];
}
}

View File

@ -71,7 +71,7 @@ class LoginMiddleware
//给request赋值用于控制器
$request->adminInfo = $adminInfo;
$request->adminId = $adminInfo['admin_id'] ?? 0;
$request->userId = $adminInfo['user_id'] ?? 0;
return $next($request);
}

View File

@ -89,6 +89,7 @@ class AdminTokenCache extends BaseCache
$adminInfo = [
'admin_id' => $admin->id,
'user_id' => $admin->user_id,
'root' => $admin->root,
'name' => $admin->name,
'account' => $admin->account,