diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-20 17:01:19 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-20 17:01:19 -0700 |
commit | 3ece1a01f25270939b3c12f754d555d6ac54d375 (patch) | |
tree | 2e802e5430b42ea1d5f64d13e5503f1a06d6bfcd /modules/gallery/helpers/access.php | |
parent | 7f9441c33da07b215efcb51668434b3957559fd3 (diff) |
Add a groups api method on the Identity provider and change access_Core::_get_all_groups() to use this to get the defined groups.
Diffstat (limited to 'modules/gallery/helpers/access.php')
-rw-r--r-- | modules/gallery/helpers/access.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/gallery/helpers/access.php b/modules/gallery/helpers/access.php index fba161e3..4e7491e3 100644 --- a/modules/gallery/helpers/access.php +++ b/modules/gallery/helpers/access.php @@ -419,10 +419,11 @@ class access_Core { * @return ORM_Iterator */ private static function _get_all_groups() { - // When we build the gallery package, it's possible that the user module is not installed yet. + // When we build the gallery package, it's possible that there is no identity provider installed yet. // This is ok at packaging time, so work around it. - if (module::is_active("user")) { - return ORM::factory("group")->find_all(); + $config = module::get_var("gallery", "identity_provider"); + if (!empty($config)) { + return Identity::groups(); } else { return array(); } |