* Add empty.

This commit is contained in:
tianshujie98
2021-05-31 10:35:02 +08:00
parent f2a4de0a42
commit 1d0d901747
+3 -1
View File
@@ -1491,12 +1491,14 @@ class projectModel extends model
$type = $this->config->systemMode == 'new' ? $project->type : 'project';
if(empty($project)) return array();
return $this->dao->select("t1.account, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
$members = $this->dao->select("t1.account, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
->where('t1.root')->eq((int)$projectID)
->andWhere('t1.type')->eq($type)
->andWhere('t2.deleted')->eq('0')
->fetchPairs('account', 'realname');
return array('') + $members;
}
/**