Allow users to override the timezone and the language
This commit is contained in:
@@ -254,7 +254,7 @@ class User extends Base
|
||||
|
||||
// If the user is connected refresh his session
|
||||
if (Session::isOpen() && $this->userSession->getId() == $values['id']) {
|
||||
$this->updateSession();
|
||||
$this->userSession->refresh();
|
||||
}
|
||||
|
||||
return $result;
|
||||
@@ -294,30 +294,6 @@ class User extends Base
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Update user session information
|
||||
*
|
||||
* @access public
|
||||
* @param array $user User data
|
||||
*/
|
||||
public function updateSession(array $user = array())
|
||||
{
|
||||
if (empty($user)) {
|
||||
$user = $this->getById($this->userSession->getId());
|
||||
}
|
||||
|
||||
if (isset($user['password'])) {
|
||||
unset($user['password']);
|
||||
}
|
||||
|
||||
$user['id'] = (int) $user['id'];
|
||||
$user['default_project_id'] = (int) $user['default_project_id'];
|
||||
$user['is_admin'] = (bool) $user['is_admin'];
|
||||
$user['is_ldap_user'] = (bool) $user['is_ldap_user'];
|
||||
|
||||
$this->session['user'] = $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common validation rules
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user