From e88a47ea3c7842d3f6904ecdd9ff488c6a630e42 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Fri, 1 Apr 2022 15:41:21 +0800 Subject: [PATCH] * Fix bug #21061. --- module/my/control.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/module/my/control.php b/module/my/control.php index c7083aca4b..5f88323431 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -922,12 +922,7 @@ EOF; $sort = common::appendOrder($orderBy); /* Get users by dept. */ - $deptID = 0; - if(!$this->app->user->admin) - { - $user = $this->loadModel('user')->getById($this->app->user->account, 'account'); - $deptID = $user->dept; - } + $deptID = $this->app->user->admin ? 0 : $this->app->user->dept; $users = $this->loadModel('company')->getUsers('inside', 'bydept', 0, $deptID, $sort, $pager); foreach($users as $user) unset($user->password); // Remove passwd.