diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-02 08:35:45 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-07-02 08:35:45 +0000 |
| commit | b76aa4407a758d9f82ebb91c72e93819f8acba3c (patch) | |
| tree | 7b2fca3a73b5c3c321f66a6e89d56a803c7dd93a | |
| parent | 8028415ff626e15a39aaa5a094038bfa0c39f175 (diff) | |
Create rcube_user instance early to enable the following plugin hooks to use it
git-svn-id: https://svn.roundcube.net/trunk@2698 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/program/include/rcube_user.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_user.php b/roundcubemail/program/include/rcube_user.php index 8c77a0306..e02ed49ec 100644 --- a/roundcubemail/program/include/rcube_user.php +++ b/roundcubemail/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; } |
