diff options
author | thomascube <thomas@roundcube.net> | 2008-02-02 19:44:37 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2008-02-02 19:44:37 +0000 |
commit | adc3e41f6e3dabff366dcecbae1cc7466decf983 (patch) | |
tree | 8113c2c88fdba22788e221da73fcd64fd0674d7c /program/include/main.inc | |
parent | df0da2e059ac7d12f5fbd4735a66736b2efdf61d (diff) |
Always update $CONFIG with user prefs (#1484729)
Diffstat (limited to 'program/include/main.inc')
-rw-r--r-- | program/include/main.inc | 8 |
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'])) |