Remove alias handling - the feature doesn't exist in core anymore
This commit is contained in:
parent
39552da980
commit
73d1dba092
4 changed files with 16 additions and 28 deletions
|
@ -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'] = '';
|
||||
|
|
|
@ -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];
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
||||
?>
|
||||
|
|
|
@ -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 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'];
|
||||
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;
|
||||
}
|
||||
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];
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue