From 3f95bef544a17bf5d7e037c0a9e39e437db5f40e Mon Sep 17 00:00:00 2001 From: skeeter Date: Sun, 13 Jan 2002 03:58:41 +0000 Subject: [PATCH] Added a call to sessions->delete_cache() and a call to re-read the users session data when being set to the default preferences set by the admin. --- phpgwapi/inc/class.preferences.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/phpgwapi/inc/class.preferences.inc.php b/phpgwapi/inc/class.preferences.inc.php index aa9cf151ec..666ae1779e 100644 --- a/phpgwapi/inc/class.preferences.inc.php +++ b/phpgwapi/inc/class.preferences.inc.php @@ -239,6 +239,7 @@ if ($GLOBALS['phpgw_info']['server']['cache_phpgw_info'] && $this->account_id == $GLOBALS['phpgw_info']['user']['account_id']) { + $GLOBALS['phpgw']->session->delete_cache($this->account_id); $GLOBALS['phpgw']->session->read_repositories(False); } @@ -261,6 +262,12 @@ $this->db->query("insert into phpgw_preferences values ('$account_id','" . $this->db->f('preference_value') . "')",__LINE__,__FILE__); } + + if ($GLOBALS['phpgw_info']['server']['cache_phpgw_info'] && $account_id == $GLOBALS['phpgw_info']['user']['account_id']) + { + $GLOBALS['phpgw']->session->read_repositories(False); + } + } /*! @@ -507,6 +514,7 @@ // are we dealing with the default email account or an extra email account? if (!(isset($acctnum)) || ((string)$acctnum == '')) { + settype($acctnum,'integer'); // account 0 is the default email account $acctnum = 0; // $prefs stays AS IS!