[Kolab-devel] Password change on multi-domain setup
Toke Høiland-Jørgensen
toke at toke.dk
Tue Oct 22 02:31:04 CEST 2013
Had to apply this patch to the currently shipped roundcube to get user
password changing to work in a multi-domain setup (along with
substituting %dc for the manager domain in the password_ldap_basedn and
password_ldap_search_base config items of
/etc/roundcubemail/password.inc.php).
I realise this is probably a patch that should go into upstream
roundcube, and I'll see about submitting it appropriately in the
morning. In the meantime I thought it would be useful to post it here. :)
-Toke
diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php
index cf62deb..d694e64 100644
--- a/plugins/password/drivers/ldap.php
+++ b/plugins/password/drivers/ldap.php
@@ -133,7 +133,7 @@ class rcube_ldap_password
$ldapConfig = array (
'binddn' => $rcmail->config->get('password_ldap_searchDN'),
'bindpw' => $rcmail->config->get('password_ldap_searchPW'),
- 'basedn' => $rcmail->config->get('password_ldap_basedn'),
+ 'basedn' => self::substitute_vars($rcmail->config->get('password_ldap_basedn')),
'host' => $rcmail->config->get('password_ldap_host'),
'port' => $rcmail->config->get('password_ldap_port'),
'starttls' => $rcmail->config->get('password_ldap_starttls'),
@@ -146,7 +146,7 @@ class rcube_ldap_password
return '';
}
- $base = $rcmail->config->get('password_ldap_search_base');
+ $base = self::substitute_vars($rcmail->config->get('password_ldap_search_base'));
$filter = self::substitute_vars($rcmail->config->get('password_ldap_search_filter'));
$options = array (
'scope' => 'sub',
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/devel/attachments/20131022/12625e4b/attachment.sig>
More information about the devel
mailing list