diff --git a/phpgwapi/inc/phpgw.inc.php b/phpgwapi/inc/phpgw.inc.php index 982cc0930b..808fe59729 100644 --- a/phpgwapi/inc/phpgw.inc.php +++ b/phpgwapi/inc/phpgw.inc.php @@ -184,7 +184,10 @@ include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_".$phpgw_info["server"]["account_repository"].".inc.php"); include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_shared.inc.php"); $this->auth = new auth; - $this->preferences = new preferences($phpgw_info["user"]["account_lid"]); + $this->preferences = new preferences(); + $this->preferences->preferences = $phpgw_info["user"]["preferences"]; + $this->preferences->account_id = $phpgw_info["user"]["account_id"]; + } $this->accounts = new accounts; $this->translation = new translation; diff --git a/phpgwapi/inc/phpgw_auth_sql.inc.php b/phpgwapi/inc/phpgw_auth_sql.inc.php index 16688bde9b..9f8348f2ea 100644 --- a/phpgwapi/inc/phpgw_auth_sql.inc.php +++ b/phpgwapi/inc/phpgw_auth_sql.inc.php @@ -36,4 +36,4 @@ } } } -?> \ No newline at end of file +?> diff --git a/phpgwapi/inc/phpgw_session.inc.php b/phpgwapi/inc/phpgw_session.inc.php index ed40c6665a..ad2dcf6780 100644 --- a/phpgwapi/inc/phpgw_session.inc.php +++ b/phpgwapi/inc/phpgw_session.inc.php @@ -56,7 +56,7 @@ if (PHP_VERSION > "4.0.3pl1") { $phpgw_info = unserialize($db->f("session_info")); } else { - $phpgw_info = unserialize(stripslashes($db->f("session_info"))); + $phpgw_info = unserialize(stripslashes($db->f("session_info"))); } $phpgw_info["flags"] = $phpgw_info_flags; @@ -77,6 +77,8 @@ if (! $phpgw_info["user"]["userid"] ) { return False; } else { + $phpgw->preferences->preferences = $phpgw_info["user"]["preferences"]; + $phpgw->preferences->account_id = $phpgw_info["user"]["account_id"]; return True; } }