aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/event_calendar/manage_subscribers.php2
-rw-r--r--actions/event_calendar/toggle_personal_calendar.php9
2 files changed, 10 insertions, 1 deletions
diff --git a/actions/event_calendar/manage_subscribers.php b/actions/event_calendar/manage_subscribers.php
index d20c73cbd..079c3628f 100644
--- a/actions/event_calendar/manage_subscribers.php
+++ b/actions/event_calendar/manage_subscribers.php
@@ -15,7 +15,7 @@ if (($event_calendar_add_users == 'yes') && elgg_instanceof($event,'object','eve
$subject = elgg_echo('event_calendar:add_users_notify:subject');
$user = get_user($user_guid);
$message = elgg_echo('event_calendar:add_users_notify:body',array($user->name,$event->title,$event->getURL()));
- notify_user($user_guid, $site_guid, $subject, $message);
+ notify_user($user_guid, $site_guid, $subject, $message, NULL, 'email');
}
}
system_message(elgg_echo('event_calendar:manage_subscribers:success'));
diff --git a/actions/event_calendar/toggle_personal_calendar.php b/actions/event_calendar/toggle_personal_calendar.php
index 9ad8d0a0e..8eb20e6b9 100644
--- a/actions/event_calendar/toggle_personal_calendar.php
+++ b/actions/event_calendar/toggle_personal_calendar.php
@@ -19,6 +19,15 @@ if (event_calendar_has_personal_event($event_guid,$user_guid)) {
$response = array('success'=>TRUE, 'message' => $remove_response, 'button_text'=>$button_text);
} else {
if (event_calendar_add_personal_event($event_guid,$user_guid)) {
+ $event_calendar_add_users_notify = elgg_get_plugin_setting('add_users_notify', 'event_calendar');
+ if ($event_calendar_add_users_notify == 'yes') {
+ $subject = elgg_echo('event_calendar:add_users_notify:subject');
+ $user = get_user($user_guid);
+ $event = get_entity($event_guid);
+ $site_guid = elgg_get_site_entity()->guid;
+ $message = elgg_echo('event_calendar:add_users_notify:body',array($user->name,$event->title,$event->getURL()));
+ notify_user($user_guid, $site_guid, $subject, $message, NULL, 'email');
+ }
$button_text = elgg_echo('event_calendar:remove_from_the_calendar_button');
$response = array('success'=>TRUE, 'message' => $add_response, 'button_text'=>$button_text);
} else {