mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-14 19:35:46 +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
|
// Get list of group's members
|
||||||
$checked_operators = array();
|
$checked_operators = get_group_members($group_id);
|
||||||
foreach (get_group_members($group_id) as $rel) {
|
|
||||||
$checked_operators[] = $rel['operatorid'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Prepare the list of all operators
|
// Prepare the list of all operators
|
||||||
$page['operators'] = array();
|
$page['operators'] = array();
|
||||||
|
@ -431,12 +431,18 @@ function update_group($group)
|
|||||||
*/
|
*/
|
||||||
function get_group_members($group_id)
|
function get_group_members($group_id)
|
||||||
{
|
{
|
||||||
$db = Database::getInstance();
|
$rows = Database::getInstance()->query(
|
||||||
return $db->query(
|
|
||||||
"SELECT operatorid FROM {operatortoopgroup} WHERE groupid = ?",
|
"SELECT operatorid FROM {operatortoopgroup} WHERE groupid = ?",
|
||||||
array($group_id),
|
array($group_id),
|
||||||
array('return_rows' => Database::RETURN_ALL_ROWS)
|
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