summaryrefslogtreecommitdiff
path: root/app/php
diff options
context:
space:
mode:
Diffstat (limited to 'app/php')
-rw-r--r--app/php/user/DbUser.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/php/user/DbUser.php b/app/php/user/DbUser.php
index c8273f7..c8459fa 100644
--- a/app/php/user/DbUser.php
+++ b/app/php/user/DbUser.php
@@ -2,6 +2,7 @@
Prado::using('System.Security.TDbUserManager');
Prado::using('Application.model.User');
+Prado::using('Application.model.Calendar');
class DbUser extends TDbUser {
@@ -53,6 +54,14 @@ class DbUser extends TDbUser {
throw new Exception('Unimplemented CustomDbUser method');
}
+ public function getCalendarPreference() {
+ if ($this->IsGuest) {
+ return Calendar::finder()->findAllByIsVisible(1);
+ } else {
+ return $this->DbRecord->Calendars;
+ }
+ }
+
}
?>