更新用户数据
This commit is contained in:
parent
56918bc1fb
commit
fd0e8b3322
|
@ -34,6 +34,7 @@ class BaseAdminController extends BaseLikeAdminController
|
||||||
if (isset($this->request->adminInfo) && $this->request->adminInfo) {
|
if (isset($this->request->adminInfo) && $this->request->adminInfo) {
|
||||||
$this->adminInfo = $this->request->adminInfo;
|
$this->adminInfo = $this->request->adminInfo;
|
||||||
$this->adminId = $this->request->adminInfo['admin_id'];
|
$this->adminId = $this->request->adminInfo['admin_id'];
|
||||||
|
$this->userId = $this->request->adminInfo['user_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ class LoginMiddleware
|
||||||
//给request赋值,用于控制器
|
//给request赋值,用于控制器
|
||||||
$request->adminInfo = $adminInfo;
|
$request->adminInfo = $adminInfo;
|
||||||
$request->adminId = $adminInfo['admin_id'] ?? 0;
|
$request->adminId = $adminInfo['admin_id'] ?? 0;
|
||||||
|
$request->userId = $adminInfo['user_id'] ?? 0;
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,7 @@ class AdminTokenCache extends BaseCache
|
||||||
|
|
||||||
$adminInfo = [
|
$adminInfo = [
|
||||||
'admin_id' => $admin->id,
|
'admin_id' => $admin->id,
|
||||||
|
'user_id' => $admin->user_id,
|
||||||
'root' => $admin->root,
|
'root' => $admin->root,
|
||||||
'name' => $admin->name,
|
'name' => $admin->name,
|
||||||
'account' => $admin->account,
|
'account' => $admin->account,
|
||||||
|
|
Loading…
Reference in New Issue