summaryrefslogtreecommitdiff
path: root/plugins/ldap_authentication
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2012-09-23 07:25:06 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2012-09-23 07:25:06 (GMT)
commit73d1dba09208c2bec5dce8a6e1ac434b985272a7 (patch)
tree38d09d2f689a8b36e5f24a302e6dff2500233b13 /plugins/ldap_authentication
parent39552da980854bc3139ebecf9f24c826e79554ce (diff)
downloadroundcubemail-plugins-kolab-73d1dba09208c2bec5dce8a6e1ac434b985272a7.tar.gz
Remove alias handling - the feature doesn't exist in core anymore
Diffstat (limited to 'plugins/ldap_authentication')
-rw-r--r--plugins/ldap_authentication/config.inc.php.dist3
-rw-r--r--plugins/ldap_authentication/ldap_authentication.php35
2 files changed, 16 insertions, 22 deletions
diff --git a/plugins/ldap_authentication/config.inc.php.dist b/plugins/ldap_authentication/config.inc.php.dist
index ca74520..ff8e512 100644
--- a/plugins/ldap_authentication/config.inc.php.dist
+++ b/plugins/ldap_authentication/config.inc.php.dist
@@ -12,7 +12,6 @@ $rcmail_config['ldap_authentication_login'] = 'email';
// Use this fields (from fieldmap configuration) for default identity
$rcmail_config['ldap_authentication_name'] = 'name';
-$rcmail_config['ldap_authentication_alias'] = 'alias';
-$rcmail_config['ldap_authentication_email'] = 'email';
+$rcmail_config['ldap_authentication_email'] = 'email';
?>
diff --git a/plugins/ldap_authentication/ldap_authentication.php b/plugins/ldap_authentication/ldap_authentication.php
index eee9a1d..d156118 100644
--- a/plugins/ldap_authentication/ldap_authentication.php
+++ b/plugins/ldap_authentication/ldap_authentication.php
@@ -32,23 +32,21 @@ class ldap_authentication extends rcube_plugin
private $ldap;
private $data = array();
- function init()
- {
- $this->add_hook('authenticate', array($this, 'authenticate'));
- $this->add_hook('user_create', array($this, 'user_create'));
- }
-
- function user_create($args)
- {
- if (!empty($this->data['user_email']))
- $args['user_email'] = $this->data['user_email'];
- if (!empty($this->data['user_name']))
- $args['user_name'] = $this->data['user_name'];
- if (!empty($this->data['user_alias']))
- $args['user_alias'] = $this->data['user_alias'];
-
- return $args;
- }
+ function init()
+ {
+ $this->add_hook('authenticate', array($this, 'authenticate'));
+ $this->add_hook('user_create', array($this, 'user_create'));
+ }
+
+ function user_create($args)
+ {
+ if (!empty($this->data['user_email']))
+ $args['user_email'] = $this->data['user_email'];
+ if (!empty($this->data['user_name']))
+ $args['user_name'] = $this->data['user_name'];
+
+ return $args;
+ }
function authenticate($args)
{
@@ -83,13 +81,10 @@ class ldap_authentication extends rcube_plugin
$record = $results->records[0];
$login_attr = $rcmail->config->get('ldap_authentication_login');
- $alias_attr = $rcmail->config->get('ldap_authentication_alias');
$name_attr = $rcmail->config->get('ldap_authentication_name');
if ($login_attr)
$this->data['user_login'] = is_array($record[$login_attr]) ? $record[$login_attr][0] : $record[$login_attr];
- if ($alias_attr)
- $this->data['user_alias'] = is_array($record[$alias_attr]) ? $record[$alias_attr][0] : $record[$alias_attr];
if ($name_attr)
$this->data['user_name'] = is_array($record[$name_attr]) ? $record[$name_attr][0] : $record[$name_attr];