Should fix bug when sending announcements see #5394

skala
Julio Montoya 12 years ago
parent c9271629b4
commit 4654420d7b
  1. 9
      main/announcements/announcement_email.class.php

@ -148,15 +148,20 @@ class AnnouncementEmail
if ($users) { if ($users) {
$users = UserManager::get_user_list_by_ids($users, true); $users = UserManager::get_user_list_by_ids($users, true);
} else {
$users = self::all_users();
} }
if (!empty($groups)) { if (!empty($groups)) {
$group_users = GroupManager::get_groups_users($groups); $group_users = GroupManager::get_groups_users($groups);
$group_users = UserManager::get_user_list_by_ids($group_users, true); $group_users = UserManager::get_user_list_by_ids($group_users, true);
if (!empty($group_users)) {
$users = array_merge($users, $group_users); $users = array_merge($users, $group_users);
} }
}
if (empty($users)) {
$users = self::all_users();
}
//Clean users just in case //Clean users just in case
$new_list_users = array(); $new_list_users = array();

Loading…
Cancel
Save