summaryrefslogtreecommitdiff
path: root/plugins/ldap_authentication
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2012-10-17 09:54:25 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2012-10-17 09:54:25 (GMT)
commit2d08c58e56ebe9c0dd8c55679c887714178ed994 (patch)
tree7a4c5210fbfa9cdf5638181539c0b13d1a2a8bed /plugins/ldap_authentication
parent5be0b06fcbf61dacd493467b57041f808b04f1c7 (diff)
downloadroundcubemail-plugins-kolab-2d08c58e56ebe9c0dd8c55679c887714178ed994.tar.gz
Fix/prepare plugins to use out of Roundcube (where rcmail object doesn't exist)
Diffstat (limited to 'plugins/ldap_authentication')
-rw-r--r--plugins/ldap_authentication/ldap_authentication.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/ldap_authentication/ldap_authentication.php b/plugins/ldap_authentication/ldap_authentication.php
index d156118..3dc9f66 100644
--- a/plugins/ldap_authentication/ldap_authentication.php
+++ b/plugins/ldap_authentication/ldap_authentication.php
@@ -51,19 +51,19 @@ class ldap_authentication extends rcube_plugin
function authenticate($args)
{
if ($this->init_ldap()) {
- $rcmail = rcmail::get_instance();
+ $rcmail = rcube::get_instance();
$filter = $rcmail->config->get('ldap_authentication_filter');
$domain = $rcmail->config->get('username_domain');
// get username and host
$user = $args['user'];
- $host = rcube_parse_host($args['host']);
+ $host = rcube_utils::parse_host($args['host']);
if (!empty($domain) && strpos($user, '@') === false) {
if (is_array($domain) && isset($domain[$args['host']]))
- $user .= '@'.rcube_parse_host($domain[$host], $host);
+ $user .= '@'.rcube_utils::parse_host($domain[$host], $host);
else if (is_string($domain))
- $user .= '@'.rcube_parse_host($domain, $host);
+ $user .= '@'.rcube_utils::parse_host($domain, $host);
}
// replace variables in filter
@@ -102,7 +102,7 @@ class ldap_authentication extends rcube_plugin
return $this->ldap->ready;
$this->load_config();
- $rcmail = rcmail::get_instance();
+ $rcmail = rcube::get_instance();
$addressbook = $rcmail->config->get('ldap_authentication_addressbook');