summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/g2_import/helpers/g2_import.php2
-rw-r--r--modules/gallery/helpers/gallery_installer.php2
-rw-r--r--modules/notification/helpers/notification.php3
3 files changed, 5 insertions, 2 deletions
diff --git a/modules/g2_import/helpers/g2_import.php b/modules/g2_import/helpers/g2_import.php
index 8b48f727..d24aab93 100644
--- a/modules/g2_import/helpers/g2_import.php
+++ b/modules/g2_import/helpers/g2_import.php
@@ -301,7 +301,7 @@ class g2_import_Core {
$user->admin = true;
$message .= t("\n\tAdded 'admin' flag to user");
} else {
- $group = ORM::factory("group", self::map($g2_group_id));
+ $group = Identity::lookup_group(self::map($g2_group_id));
$user->add($group);
$message .= t("\n\tAdded user to group '%group'.", array("group" => $group->name));
}
diff --git a/modules/gallery/helpers/gallery_installer.php b/modules/gallery/helpers/gallery_installer.php
index b1ea1f19..10e796fd 100644
--- a/modules/gallery/helpers/gallery_installer.php
+++ b/modules/gallery/helpers/gallery_installer.php
@@ -317,7 +317,7 @@ class gallery_installer {
}
if ($version == 7) {
- $groups = ORM::factory("group")->find_all();
+ $groups = Identity::groups();
$permissions = ORM::factory("permission")->find_all();
foreach($groups as $group) {
foreach($permissions as $permission) {
diff --git a/modules/notification/helpers/notification.php b/modules/notification/helpers/notification.php
index 64eed8dc..080f154b 100644
--- a/modules/notification/helpers/notification.php
+++ b/modules/notification/helpers/notification.php
@@ -78,6 +78,9 @@ class notification {
$subscriber_ids[] = $subscriber->user_id;
}
+ if (empty($subscriber_ids)) {
+ return array();
+ }
$users = Identity::get_user_list($subscriber_ids);
$subscribers = array();