summaryrefslogtreecommitdiff
path: root/program/include/rcube_ldap.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-09-05 08:49:04 +0000
committerthomascube <thomas@roundcube.net>2011-09-05 08:49:04 +0000
commit853696b15a11708e04412001f68a516f2332363c (patch)
tree0efe4416325ddc6872fc5d568d1fdf32e9b7662f /program/include/rcube_ldap.php
parentb08caf5813c43e8648cdf5db1e003b3046a37c2c (diff)
Backport changes from trunk up to r5164
Diffstat (limited to 'program/include/rcube_ldap.php')
-rw-r--r--program/include/rcube_ldap.php7
1 files changed, 5 insertions, 2 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);