mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-07 16:24:43 +03:00
Return IDs set from "get_group_members" function
This commit is contained in:
parent
9d854e9642
commit
146c4b7ac1
@ -63,10 +63,7 @@ class MembersController extends AbstractController
|
||||
: '';
|
||||
|
||||
// Get list of group's members
|
||||
$checked_operators = array();
|
||||
foreach (get_group_members($group_id) as $rel) {
|
||||
$checked_operators[] = $rel['operatorid'];
|
||||
}
|
||||
$checked_operators = get_group_members($group_id);
|
||||
|
||||
// Prepare the list of all operators
|
||||
$page['operators'] = array();
|
||||
|
@ -431,12 +431,18 @@ function update_group($group)
|
||||
*/
|
||||
function get_group_members($group_id)
|
||||
{
|
||||
$db = Database::getInstance();
|
||||
return $db->query(
|
||||
$rows = Database::getInstance()->query(
|
||||
"SELECT operatorid FROM {operatortoopgroup} WHERE groupid = ?",
|
||||
array($group_id),
|
||||
array('return_rows' => Database::RETURN_ALL_ROWS)
|
||||
);
|
||||
|
||||
$operators = array();
|
||||
foreach ($rows as $row) {
|
||||
$operators[] = $row['operatorid'];
|
||||
}
|
||||
|
||||
return $operators;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user