summaryrefslogtreecommitdiff
path: root/program/include/rcube_user.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2009-07-02 08:35:45 +0000
committerthomascube <thomas@roundcube.net>2009-07-02 08:35:45 +0000
commit07722a2d1d9e4ff6e04a9b34a8ba42e4c4a66606 (patch)
treed4048f8755cf4201fda6a2d262a95dddc741a7fa /program/include/rcube_user.php
parentbd9bfcfa8a22f6aeb4586a837f1a715a2ec77c38 (diff)
Create rcube_user instance early to enable the following plugin hooks to use it
Diffstat (limited to 'program/include/rcube_user.php')
-rw-r--r--program/include/rcube_user.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php
index 8c77a0306..e02ed49ec 100644
--- a/program/include/rcube_user.php
+++ b/program/include/rcube_user.php
@@ -386,6 +386,10 @@ class rcube_user
if ($user_id = $dbh->insert_id(get_sequence_name('users')))
{
+ // create rcube_user instance to make plugin hooks work
+ $user_instance = new rcube_user($user_id);
+ $rcmail->user = $user_instance;
+
$mail_domain = $rcmail->config->mail_domain($host);
if ($user_email=='')
@@ -449,7 +453,7 @@ class rcube_user
'message' => "Failed to create new user"), true, false);
}
- return $user_id ? new rcube_user($user_id) : false;
+ return $user_id ? $user_instance : false;
}