summaryrefslogtreecommitdiff
path: root/app/php/events
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-05-06 17:13:32 +0200
committeremkael <emkael@tlen.pl>2016-05-06 17:13:32 +0200
commit8f3e62ac9365880ef7688504065a6e472505e344 (patch)
treebf63fde9459036dbbf232e3aaf89bc8154cce6df /app/php/events
parenta69844e2640d559ecd78fbe39d1bcadc1cb53d15 (diff)
* cloning default calendar preference for new users
Diffstat (limited to 'app/php/events')
-rw-r--r--app/php/events/CalendarPreferenceEvents.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/php/events/CalendarPreferenceEvents.php b/app/php/events/CalendarPreferenceEvents.php
new file mode 100644
index 0000000..76fa071
--- /dev/null
+++ b/app/php/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());
+ }
+
+}
+
+?>