Branch 'roundcubemail-plugins-kolab-3.0' - plugins/kolab_auth
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Wed Sep 11 17:33:12 CEST 2013
plugins/kolab_auth/kolab_auth.php | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 0d129f145c127aebba73a26da79a927f8a8d7724
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Wed Sep 11 16:31:19 2013 +0100
Add the possibility to set the a mailhost attribute value to be used as the IMAP server address to connect to.
diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php
index f511949..ddd4539 100644
--- a/plugins/kolab_auth/kolab_auth.php
+++ b/plugins/kolab_auth/kolab_auth.php
@@ -301,11 +301,21 @@ class kolab_auth extends rcube_plugin
$email_attr = $rcmail->config->get('kolab_auth_email');
$org_attr = $rcmail->config->get('kolab_auth_organization');
$role_attr = $rcmail->config->get('kolab_auth_role');
+ $imap_attr = $rcmail->config->get('kolab_auth_mailhost');
if (!empty($role_attr) && !empty($record[$role_attr])) {
$_SESSION['user_roledns'] = (array)($record[$role_attr]);
}
+ if (!empty($imap_attr) && !empty($record[$role_attr])) {
+ $default_host = $rcmail->config->get('default_host');
+ if (!empty($default_host)) {
+ rcube::write_log("errors", "Both default host and kolab_auth_mailhost set. Incompatible.");
+ } else {
+ $args['host'] = "tls://" . $record[$role_attr];
+ }
+ }
+
// Login As...
if (!empty($loginas) && $admin_login) {
// Authenticate to LDAP
More information about the commits
mailing list