plugins/kolab_auth plugins/ldap_authentication
Aleksander Machniak
machniak at kolabsys.com
Sun Sep 23 09:25:51 CEST 2012
plugins/kolab_auth/config.inc.php.dist | 5 +-
plugins/kolab_auth/kolab_auth.php | 5 --
plugins/ldap_authentication/config.inc.php.dist | 3 -
plugins/ldap_authentication/ldap_authentication.php | 35 ++++++++------------
4 files changed, 18 insertions(+), 30 deletions(-)
New commits:
commit 73d1dba09208c2bec5dce8a6e1ac434b985272a7
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Sun Sep 23 09:25:06 2012 +0200
Remove alias handling - the feature doesn't exist in core anymore
diff --git a/plugins/kolab_auth/config.inc.php.dist b/plugins/kolab_auth/config.inc.php.dist
index d14a3b9..d28ff08 100644
--- a/plugins/kolab_auth/config.inc.php.dist
+++ b/plugins/kolab_auth/config.inc.php.dist
@@ -12,7 +12,6 @@ $rcmail_config['kolab_auth_login'] = 'email';
// Use this fields (from fieldmap configuration) for default identity
$rcmail_config['kolab_auth_name'] = 'name';
-$rcmail_config['kolab_auth_alias'] = 'alias';
$rcmail_config['kolab_auth_email'] = 'email';
// Login and password of the admin user. Enables "Login As" feature.
@@ -20,10 +19,10 @@ $rcmail_config['kolab_auth_admin_login'] = '';
$rcmail_config['kolab_auth_admin_password'] = '';
// Enable audit logging for abuse of administrative privileges.
-$rcmail_config['kolab_auth_auditlog'] = true;
+$rcmail_config['kolab_auth_auditlog'] = true;
// Role field (from fieldmap configuration)
-$rcmail_config['kolab_auth_role'] = 'role';
+$rcmail_config['kolab_auth_role'] = 'role';
// The required value for the role attribute to contain should the user be allowed
// to login as another user.
$rcmail_config['kolab_auth_role_value'] = '';
diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php
index 691f542..00b9f8b 100644
--- a/plugins/kolab_auth/kolab_auth.php
+++ b/plugins/kolab_auth/kolab_auth.php
@@ -203,8 +203,6 @@ class kolab_auth extends rcube_plugin
$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;
}
@@ -253,7 +251,6 @@ class kolab_auth extends rcube_plugin
$admin_login = $rcmail->config->get('kolab_auth_admin_login');
$admin_pass = $rcmail->config->get('kolab_auth_admin_password');
$login_attr = $rcmail->config->get('kolab_auth_login');
- $alias_attr = $rcmail->config->get('kolab_auth_alias');
$name_attr = $rcmail->config->get('kolab_auth_name');
// get username and host
@@ -351,8 +348,6 @@ class kolab_auth extends rcube_plugin
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];
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];
More information about the commits
mailing list