mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
- added function getManagers()
This commit is contained in:
parent
56290a33fd
commit
bff6f66ca0
|
@ -103,6 +103,25 @@ class LetoDMS_Core_Group {
|
|||
return $this->_users;
|
||||
} /* }}} */
|
||||
|
||||
function getManagers() { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
$queryStr = "SELECT `tblUsers`.* FROM `tblUsers` ".
|
||||
"LEFT JOIN `tblGroupMembers` ON `tblGroupMembers`.`userID`=`tblUsers`.`id` ".
|
||||
"WHERE `tblGroupMembers`.`groupID` = '". $this->_id ."' AND tblGroupMembers.manager = 1";
|
||||
$resArr = $db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr == false)
|
||||
return false;
|
||||
|
||||
$managers = array();
|
||||
|
||||
foreach ($resArr as $row) {
|
||||
$user = new LetoDMS_Core_User($row["id"], $row["login"], $row["pwd"], $row["fullName"], $row["email"], $row["language"], $row["theme"], $row["comment"], $row["role"], $row['hidden']);
|
||||
array_push($managers, $user);
|
||||
}
|
||||
return $managers;
|
||||
} /* }}} */
|
||||
|
||||
function addUser($user,$asManager=false) { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user