From 239ef60e4e2e2f53290065f9b885763e580efbb1 Mon Sep 17 00:00:00 2001 From: daitingting Date: Tue, 20 Feb 2024 14:27:26 +0800 Subject: [PATCH] * Fix bug #43415. --- module/my/control.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/module/my/control.php b/module/my/control.php index b11f7b5261..c858b5fd86 100755 --- a/module/my/control.php +++ b/module/my/control.php @@ -1107,13 +1107,17 @@ class my extends control /* Get users by 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. + foreach($users as $user) + { + unset($user->password); // Remove passwd. + $user->last = $user->last ? date(DT_DATETIME1, $user->last) : ''; + } - $this->view->title = $this->lang->my->team; - $this->view->users = $users; - $this->view->deptID = $deptID; - $this->view->orderBy = $orderBy; - $this->view->pager = $pager; + $this->view->title = $this->lang->my->team; + $this->view->users = $users; + $this->view->deptID = $deptID; + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; $this->display(); }