diff options
Diffstat (limited to 'app/php/components/TimezoneSelect.php')
-rw-r--r-- | app/php/components/TimezoneSelect.php | 5 |
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() { |