diff options
Diffstat (limited to 'modules/user/helpers/group.php')
-rw-r--r-- | modules/user/helpers/group.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index b13895bc..fbc5157d 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -73,6 +73,26 @@ class group_Core { return null; } + /** + * List the users + * @param mixed filters (@see Database.php + * @return array the group list. + */ + static function get_group_list($filter=array()) { + $group = ORM::factory("group"); + + foreach($filter as $method => $args) { + switch ($method) { + case "in": + $group->in($args[0], $args[1]); + break; + default: + $group->$method($args); + } + } + return $group->find_all(); + } + static function get_edit_form_admin($group) { $form = new Forge("admin/users/edit_group/$group->id", "", "post", array("id" => "g-edit-group-form")); $form_group = $form->group("edit_group")->label(t("Edit Group")); |