summaryrefslogtreecommitdiff
path: root/app/php/user
diff options
context:
space:
mode:
Diffstat (limited to 'app/php/user')
-rw-r--r--app/php/user/DbUser.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/php/user/DbUser.php b/app/php/user/DbUser.php
index 896d73d..7e6096c 100644
--- a/app/php/user/DbUser.php
+++ b/app/php/user/DbUser.php
@@ -63,6 +63,18 @@ class DbUser extends TDbUser {
}
}
+ public function isCalendarPreferred($calendarID) {
+ return in_array(
+ $calendarID,
+ array_map(
+ function($calendar) {
+ return $calendar->UID;
+ },
+ $this->getCalendarPreference()
+ )
+ );
+ }
+
public function setTimezonePreference($timezone) {
if ($this->IsGuest) {
throw new TInvalidDataException('Timezone preference change impossible for guest user');