Commit 7b3193e3 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Added a function to retrieve the ID numbers of all group admins in a group.

parent b0755e9e
......@@ -364,6 +364,19 @@ function delete_group($groupid) {
update_record('group', array('deleted' => 1), array('id' => $groupid));
}
/**
* Returns a list of user IDs who are admins for a group
*
* @param int
* @return array
*/
function group_get_admin_ids($group) {
return (array)get_column_sql("SELECT member
FROM {group_member}
WHERE \"group\" = ?
AND role = 'admin'", $group);
}
/**
* Sets up groups for display in mygroups.php and find.php
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment