* [bug#50640,done,0.1h] filter deleted user.

This commit is contained in:
tianshujie
2024-06-06 13:25:52 +08:00
parent ed972b73bf
commit b4ceec5875
+4 -2
View File
@@ -197,12 +197,14 @@ class reportModel extends model
->query();
$todos = array();
$users = $this->loadModel('user')->getPairs('nodeleted');
while($todo = $stmt->fetch())
{
$user = !empty($todo->assignedTo) ? $todo->assignedTo : $todo->account;
if(!isset($users[$user])) continue;
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->objectID)->from(TABLE_TASK)->fetch('name');
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->objectID)->from(TABLE_BUG)->fetch('title');
$user = !empty($todo->assignedTo) ? $todo->assignedTo : $todo->account;
$todos[$user][] = $todo;
}
return $todos;