diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-05 14:04:27 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-09 01:26:35 -0700 |
| commit | 00ee91837faf4807fb17dde3272ca8248a9dcd94 (patch) | |
| tree | 29bf1e98cdb6fc16c548b5dfbe15a965cb524235 /modules/user/helpers/group.php | |
| parent | f67bfd099296602f60d48914ae4b09d65b0ad8d3 (diff) | |
Convert direct lookups for the user table using ORM to using the user::lookup_by_name and user_lookup API methods.
Convert the Admin_User controller
Convert the login and password change controller
Change the item model to call user::lookup to get the owner.
On the log model, delete the relationship between the log and user table, and replace with a
call to user::lookup
(cherry picked from commit 194cc3b27a73afe5119da9f09407c1e068dc6fa3)
Create the get_user_list, lookup_by_name, lookup_by_hash and get_group_list api functions
Diffstat (limited to 'modules/user/helpers/group.php')
| -rw-r--r-- | modules/user/helpers/group.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/user/helpers/group.php b/modules/user/helpers/group.php index b13895bc..2590c7d1 100644 --- a/modules/user/helpers/group.php +++ b/modules/user/helpers/group.php @@ -73,6 +73,20 @@ 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) { + $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")); |
