From 401ea2f81084aa0c6c832d87872e43972fe04f4a Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Fri, 13 May 2022 08:47:46 +0800 Subject: [PATCH] * Fix bug #22407. --- module/user/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/user/control.php b/module/user/control.php index 0c474f3a26..2a0cbb46bc 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -80,7 +80,8 @@ class user extends control $account = $user->account; $todos = $this->todo->getList($type, $account, $status, 0, $pager, $sort); $date = (int)$type == 0 ? helper::today() : $type; - $users = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'id'); + $deptID = $this->app->user->admin ? 0 : $this->app->user->dept; + $users = $this->loadModel('dept')->getDeptUserPairs($deptID, 'id'); if(!isset($users[$userID])) return print(js::error($this->lang->user->error->noAccess) . js::locate('back')); /* set menus. */