diff --git a/module/action/model.php b/module/action/model.php index 718d885972..f1adc87c36 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -1042,6 +1042,8 @@ class actionModel extends model } $objectNames['user'][0] = 'guest'; // Add guest account. + /* Get the same dept department. */ + $deptUsers = $this->loadModel('dept')->getDeptUserPairs($this->app->user->dept, 'useid'); foreach($actions as $i => $action) { /* Add name field to the actions. */ @@ -1118,6 +1120,10 @@ class actionModel extends model $appendLib = $docLib->deleted == '1' ? $action->objectID : 0; $action->objectLink = helper::createLink('doc', 'objectLibs', sprintf($vars, $docLib->type, $docLib->objectID, $action->objectID, $appendLib)); } + elseif($action->objectType == 'user') + { + $action->objectLink = !isset($deptUsers[$action->objectID]) ? 'javascript:void(0)' : helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID), '', '', $projectID); + } else { $action->objectLink = helper::createLink($moduleName, $methodName, sprintf($vars, $action->objectID), '', '', $projectID);