From b3334afa15f081eef552e5dd6c11cf7648697ec5 Mon Sep 17 00:00:00 2001 From: Anyon Date: Wed, 17 Jun 2020 14:12:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8E=E5=8F=B0=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Index.php | 4 ++-- vendor/services.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index 03a5e16fb..73ee223f5 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -57,7 +57,7 @@ class Index extends Controller public function info($id = 0) { $this->_applyFormToken(); - if (intval($this->app->session->get('user.id')) === intval($id)) { + if (AdminService::instance()->getUserId() === intval($id)) { $this->_form('SystemUser', 'admin@user/form', 'id', [], ['id' => $id]); } else { $this->error('只能修改登录用户的资料!'); @@ -75,7 +75,7 @@ class Index extends Controller public function pass($id = 0) { $this->_applyFormToken(); - if (intval($this->app->session->get('user.id')) !== intval($id)) { + if (AdminService::instance()->getUserId() !== intval($id)) { $this->error('只能修改当前用户的密码!'); } if ($this->app->request->isGet()) { diff --git a/vendor/services.php b/vendor/services.php index fb2f3687c..bdfceb91e 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'think\\app\\Service',