diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-05 08:05:40 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-05 08:05:40 +0000 |
| commit | dae8c78ae57b1143cd90046648e9ed1ae4e8af4e (patch) | |
| tree | 08397ea2f1bdba723df4878e09bf9acc9b5fcdfc /roundcubemail/program/include/rcube_ldap.php | |
| parent | f60f3efeebbdaf3760d8814d86f3dae4d817db1c (diff) | |
Fallback to mail_domain in LDAP variable replacements; add 'host' to 'user_create' hook arguments (#1488024)
git-svn-id: https://svn.roundcube.net/trunk@5162 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_ldap.php')
| -rw-r--r-- | roundcubemail/program/include/rcube_ldap.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/roundcubemail/program/include/rcube_ldap.php b/roundcubemail/program/include/rcube_ldap.php index bf978a7ff..699691d87 100644 --- a/roundcubemail/program/include/rcube_ldap.php +++ b/roundcubemail/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); |
