summaryrefslogtreecommitdiff
path: root/app/php/components/TimezoneSelect.php
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-03-28 18:50:15 +0200
committeremkael <emkael@tlen.pl>2016-03-28 18:50:15 +0200
commit92438c15ae16765142795605dedb4a203ff5d6c6 (patch)
tree10c521134819e65e89a2177169dccb8a08059976 /app/php/components/TimezoneSelect.php
parentb40eca92d8e5cfd561855a440550fecc86ca4bdc (diff)
* timezone preferences refactored
Diffstat (limited to 'app/php/components/TimezoneSelect.php')
-rw-r--r--app/php/components/TimezoneSelect.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/php/components/TimezoneSelect.php b/app/php/components/TimezoneSelect.php
index 50dc494..3302e2a 100644
--- a/app/php/components/TimezoneSelect.php
+++ b/app/php/components/TimezoneSelect.php
@@ -12,7 +12,7 @@ class TimezoneSelect extends TTemplateControl {
public function setUserToChange(DbUser $user) {
if ($user->IsGuest) {
throw new TInvalidDataValueException(
- 'Password change impossible for guest user'
+ 'Timezone preference change impossible for guest user'
);
}
$this->setControlState('user', $user);
@@ -30,8 +30,7 @@ class TimezoneSelect extends TTemplateControl {
}
public function saveTimezone($sender, $param) {
- $this->UserToChange->DbRecord->Timezone = $this->Timezones->SelectedValue;
- $this->UserToChange->DbRecord->save();
+ $this->UserToChange->setTimezonePreference($this->Timezones->SelectedValue);
}
private function _getTimezones() {