From 853696b15a11708e04412001f68a516f2332363c Mon Sep 17 00:00:00 2001 From: thomascube Date: Mon, 5 Sep 2011 08:49:04 +0000 Subject: Backport changes from trunk up to r5164 --- plugins/new_user_identity/new_user_identity.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/new_user_identity/new_user_identity.php b/plugins/new_user_identity/new_user_identity.php index 2fc025b59..32c2c9d03 100644 --- a/plugins/new_user_identity/new_user_identity.php +++ b/plugins/new_user_identity/new_user_identity.php @@ -6,7 +6,7 @@ * * This plugin requires that a working public_ldap directory be configured. * - * @version 1.02 + * @version 1.05 * @author Kris Steinhoff * * Example configuration: @@ -39,7 +39,7 @@ class new_user_identity extends rcube_plugin { $rcmail = rcmail::get_instance(); - if ($this->init_ldap()) { + if ($this->init_ldap($args['host'])) { $results = $this->ldap->search('*', $args['user'], TRUE); if (count($results->records) == 1) { $args['user_name'] = $results->records[0]['name']; @@ -54,7 +54,7 @@ class new_user_identity extends rcube_plugin return $args; } - private function init_ldap() + private function init_ldap($host) { if ($this->ldap) return $this->ldap->ready; @@ -72,7 +72,7 @@ class new_user_identity extends rcube_plugin $this->ldap = new new_user_identity_ldap_backend( $ldap_config[$addressbook], $rcmail->config->get('ldap_debug'), - $rcmail->config->mail_domain($_SESSION['imap_host']), + $rcmail->config->mail_domain($host), $match); return $this->ldap->ready; @@ -81,7 +81,7 @@ class new_user_identity extends rcube_plugin class new_user_identity_ldap_backend extends rcube_ldap { - function __construct($p, $debug=false, $mail_domain=NULL, $search=null) + function __construct($p, $debug, $mail_domain, $search) { parent::__construct($p, $debug, $mail_domain); $this->prop['search_fields'] = (array)$search; -- cgit v1.2.3