From 5b3a0a2797c8939b397f37dbb9cbf05a50622895 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Fri, 19 Oct 2012 09:30:51 -0400 Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail --- program/include/rcube_user.php | 13 +++++++++---- program/include/iniset.php | 4 +++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/program/include/iniset.php b/program/include/iniset.php index a2f43b3..82278c9 100644 --- a/program/include/iniset.php +++ b/program/include/iniset.php @@ -34,7 +34,9 @@ ); foreach ($config as $optname => $optval) { if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) { - die("ERROR: Wrong '$optname' option value. Read REQUIREMENTS section in INSTALL file or use Roundcube Installer, please!"); + die("ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n" + ."Check your PHP configuration (including php_admin_flag).\n" + ."Read REQUIREMENTS section in INSTALL file or use Roundcube Installer!"); } } diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php index 5a65a51..b92187a 100644 --- a/program/include/rcube_user.php +++ b/program/include/rcube_user.php @@ -449,6 +449,7 @@ 'user_name' => $user_name, 'user_email' => $user_email, 'email_list' => $email_list, + 'language' => $_SESSION['language'], )); // plugin aborted this operation @@ -462,13 +463,17 @@ " VALUES (".$dbh->now().", ".$dbh->now().", ?, ?, ?)", strip_newlines($data['user']), strip_newlines($data['host']), - strip_newlines($data['language'] ? $data['language'] : $_SESSION['language'])); + strip_newlines($data['language'])); if ($user_id = $dbh->insert_id('users')) { // create rcube_user instance to make plugin hooks work - $user_instance = new rcube_user($user_id); - $rcube->user = $user_instance; - + $user_instance = new rcube_user($user_id, array( + 'user_id' => $user_id, + 'username' => $data['user'], + 'mail_host' => $data['host'], + 'language' => $data['language'], + )); + $rcube->user = $user_instance; $mail_domain = $rcube->config->mail_domain($data['host']); $user_name = $data['user_name']; $user_email = $data['user_email']; -- Gitblit v1.9.1