Add the possibility to set the a mailhost attribute value to be used as the IMAP server address to connect to.
This commit is contained in:
parent
8002f2b0ca
commit
610036138a
1 changed files with 10 additions and 0 deletions
|
@ -326,11 +326,21 @@ class kolab_auth extends rcube_plugin
|
||||||
$email_attr = $rcmail->config->get('kolab_auth_email');
|
$email_attr = $rcmail->config->get('kolab_auth_email');
|
||||||
$org_attr = $rcmail->config->get('kolab_auth_organization');
|
$org_attr = $rcmail->config->get('kolab_auth_organization');
|
||||||
$role_attr = $rcmail->config->get('kolab_auth_role');
|
$role_attr = $rcmail->config->get('kolab_auth_role');
|
||||||
|
$imap_attr = $rcmail->config->get('kolab_auth_mailhost');
|
||||||
|
|
||||||
if (!empty($role_attr) && !empty($record[$role_attr])) {
|
if (!empty($role_attr) && !empty($record[$role_attr])) {
|
||||||
$_SESSION['user_roledns'] = (array)($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...
|
// Login As...
|
||||||
if (!empty($loginas) && $admin_login) {
|
if (!empty($loginas) && $admin_login) {
|
||||||
// Authenticate to LDAP
|
// Authenticate to LDAP
|
||||||
|
|
Loading…
Add table
Reference in a new issue