canEdit()) { set_time_limit(0); $body .= PHP_EOL . PHP_EOL; $body .= elgg_echo("group_tools:mail:message:from") . ": " . $group->name . " [" . $group->getURL() . "]"; foreach ($user_guids as $guid) { notify_user($guid, $group->getGUID(), $subject, $body, NULL, "email"); } system_message(elgg_echo("group_tools:action:mail:success")); $forward_url = $group->getURL(); } else { register_error(elgg_echo("group_tools:action:error:edit")); } } else { register_error(elgg_echo("group_tools:action:error:entity")); } } else { register_error(elgg_echo("group_tools:action:error:input")); } forward($forward_url);