Skip to content
Snippets Groups Projects
Commit fe1fc590 authored by Jared Hancock's avatar Jared Hancock
Browse files

Implement client timezone preference

parent 6074f1fd
No related branches found
No related tags found
No related merge requests found
...@@ -419,8 +419,6 @@ abstract class UserAuthenticationBackend extends AuthenticationBackend { ...@@ -419,8 +419,6 @@ abstract class UserAuthenticationBackend extends AuthenticationBackend {
$authsession = array(); //clear. $authsession = array(); //clear.
$authsession['id'] = $user->getId(); $authsession['id'] = $user->getId();
$authsession['key'] = $authkey; $authsession['key'] = $authkey;
$_SESSION['TZ_OFFSET'] = $ost->getConfig()->getTZoffset();
$_SESSION['TZ_DST'] = $ost->getConfig()->observeDaylightSaving();
//The backend used decides the format of the auth key. //The backend used decides the format of the auth key.
// XXX: encrypt to hide the bk?? // XXX: encrypt to hide the bk??
......
...@@ -277,8 +277,11 @@ class ClientAccount extends ClientAccountModel { ...@@ -277,8 +277,11 @@ class ClientAccount extends ClientAccountModel {
const PASSWD_RESET_REQUIRED = 0x0002; const PASSWD_RESET_REQUIRED = 0x0002;
function __onload() { function __onload() {
if ($this->get('timezone_id')) if ($this->get('timezone_id')) {
$this->timezone = Timezone::getOffsetById($this->ht['timezone_id']); $this->timezone = Timezone::getOffsetById($this->ht['timezone_id']);
$_SESSION['TZ_OFFSET'] = $this->timezone;
$_SESSION['TZ_DST'] = $this->get('dst');
}
} }
function checkPassword($password, $autoupdate=true) { function checkPassword($password, $autoupdate=true) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment