* finish task #2459.

This commit is contained in:
chenfeiCF
2016-02-23 21:46:26 +08:00
parent 0269715534
commit 7683db7228
4 changed files with 45 additions and 5 deletions
+16
View File
@@ -178,6 +178,22 @@ class groupModel extends model
->fetchPairs();
}
/**
* Get user pairs of a dept.
*
* @param int $deptID
* @access public
* @return array
*/
public function getDeptUserPairs($deptID = 0)
{
return $this->dao->select('account, realname')->from(TABLE_USER)
->where('deleted')->eq(0)
->beginIF($deptID)->andWhere('dept')->eq((int)$deptID)
->orderBy('account')
->fetchPairs();
}
/**
* Delete a group.
*