summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_ldap.php7
-rw-r--r--program/include/rcube_user.php2
2 files changed, 6 insertions, 3 deletions
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index bf978a7ff..699691d87 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -181,8 +181,11 @@ class rcube_ldap extends rcube_addressbook
}
// Get the pieces needed for variable replacement.
- $fu = $RCMAIL->user->get_username();
- list($u, $d) = explode('@', $fu);
+ if ($fu = $RCMAIL->user->get_username())
+ list($u, $d) = explode('@', $fu);
+ else
+ $d = $this->mail_domain;
+
$dc = 'dc='.strtr($d, array('.' => ',dc=')); // hierarchal domain string
$replaces = array('%dc' => $dc, '%d' => $d, '%fu' => $fu, '%u' => $u);
diff --git a/program/include/rcube_user.php b/program/include/rcube_user.php
index d2bbaa176..dc5767d14 100644
--- a/program/include/rcube_user.php
+++ b/program/include/rcube_user.php
@@ -437,7 +437,7 @@ class rcube_user
}
$data = $rcmail->plugins->exec_hook('user_create',
- array('user'=>$user, 'user_name'=>$user_name, 'user_email'=>$user_email));
+ array('user'=>$user, 'user_name'=>$user_name, 'user_email'=>$user_email, 'host'=>$host));
// plugin aborted this operation
if ($data['abort'])