summaryrefslogtreecommitdiff
path: root/app/frontend/events/CalendarPreferenceEvents.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/frontend/events/CalendarPreferenceEvents.php')
-rw-r--r--app/frontend/events/CalendarPreferenceEvents.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/frontend/events/CalendarPreferenceEvents.php b/app/frontend/events/CalendarPreferenceEvents.php
new file mode 100644
index 0000000..76fa071
--- /dev/null
+++ b/app/frontend/events/CalendarPreferenceEvents.php
@@ -0,0 +1,16 @@
+<?php
+
+Prado::using('Application.events.EventModule');
+Prado::using('Application.model.User');
+Prado::using('Application.facades.CalendarFacade');
+
+class CalendarPreferenceEvents extends EventModule {
+
+ public function onUserRegistered(User $user) {
+ $facade = CalendarFacade::getInstance();
+ $facade->setPreferredCalendars($user, $facade->getDefaultPreference());
+ }
+
+}
+
+?>