summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-02-02 19:44:37 +0000
committerthomascube <thomas@roundcube.net>2008-02-02 19:44:37 +0000
commitadc3e41f6e3dabff366dcecbae1cc7466decf983 (patch)
tree8113c2c88fdba22788e221da73fcd64fd0674d7c /program
parentdf0da2e059ac7d12f5fbd4735a66736b2efdf61d (diff)
Always update $CONFIG with user prefs (#1484729)
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc8
1 files changed, 3 insertions, 5 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 7892d0924..792a316cc 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -92,8 +92,7 @@ function rcmail_startup($task='mail')
$USER = new rcube_user($_SESSION['user_id']);
// overwrite config with user preferences
- if (is_array($_SESSION['user_prefs']))
- $CONFIG = array_merge($CONFIG, $_SESSION['user_prefs']);
+ $CONFIG = array_merge($CONFIG, (array)$USER->get_prefs());
// reset some session parameters when changing task
@@ -591,7 +590,7 @@ function rcmail_login($user, $pass, $host=NULL)
// query if user already registered
if ($existing = rcube_user::query($user, $host))
- $USER = $existing;
+ $USER = $existing;
// user already registered -> overwrite username
if ($USER->ID)
@@ -608,8 +607,7 @@ function rcmail_login($user, $pass, $host=NULL)
if ($USER->ID)
{
// get user prefs
- $_SESSION['user_prefs'] = $USER->get_prefs();
- array_merge($CONFIG, $_SESSION['user_prefs']);
+ $CONFIG = array_merge($CONFIG, (array)$USER->get_prefs());
// set user specific language
if (!empty($USER->data['language']))