summaryrefslogtreecommitdiff
path: root/lib/plugins/authldap
diff options
context:
space:
mode:
authorKlap-in <klapinklapin@gmail.com>2013-06-09 22:21:37 +0200
committerKlap-in <klapinklapin@gmail.com>2013-06-09 22:21:37 +0200
commit3faed524fdb5c7c51a60a92e9715dd5425389c35 (patch)
treeb37b25628bdf2fde079c4f2800d2fc118d726d0e /lib/plugins/authldap
parent3e7e6067571e660cd835164c22d0973aa6343408 (diff)
parent62765857f84626449d6c53b1a46c462a37e5083a (diff)
downloadrpg-3faed524fdb5c7c51a60a92e9715dd5425389c35.tar.gz
rpg-3faed524fdb5c7c51a60a92e9715dd5425389c35.tar.bz2
Merge remote-tracking branch 'origin/master' into fetchftp
Diffstat (limited to 'lib/plugins/authldap')
-rw-r--r--lib/plugins/authldap/auth.php10
-rw-r--r--lib/plugins/authldap/conf/default.php3
-rw-r--r--lib/plugins/authldap/conf/metadata.php1
-rw-r--r--lib/plugins/authldap/lang/en/settings.php9
4 files changed, 16 insertions, 7 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index b49aa4792..6a967a6d4 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -248,7 +248,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
// always add the default group to the list of groups
- if(!in_array($conf['defaultgroup'], $info['grps'])) {
+ if(!$info['grps'] or !in_array($conf['defaultgroup'], $info['grps'])) {
$info['grps'][] = $conf['defaultgroup'];
}
return $info;
@@ -502,23 +502,23 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* @return resource
*/
protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null,
- $attrsonly = 0, $sizelimit = 0, $timelimit = 0, $deref = LDAP_DEREF_NEVER) {
+ $attrsonly = 0, $sizelimit = 0) {
if(is_null($attributes)) $attributes = array();
if($scope == 'base') {
return @ldap_read(
$link_identifier, $base_dn, $filter, $attributes,
- $attrsonly, $sizelimit, $timelimit, $deref
+ $attrsonly, $sizelimit
);
} elseif($scope == 'one') {
return @ldap_list(
$link_identifier, $base_dn, $filter, $attributes,
- $attrsonly, $sizelimit, $timelimit, $deref
+ $attrsonly, $sizelimit
);
} else {
return @ldap_search(
$link_identifier, $base_dn, $filter, $attributes,
- $attrsonly, $sizelimit, $timelimit, $deref
+ $attrsonly, $sizelimit
);
}
}
diff --git a/lib/plugins/authldap/conf/default.php b/lib/plugins/authldap/conf/default.php
index d07f9c82e..2c295eeeb 100644
--- a/lib/plugins/authldap/conf/default.php
+++ b/lib/plugins/authldap/conf/default.php
@@ -9,6 +9,7 @@ $conf['groupfilter'] = '';
$conf['version'] = 2;
$conf['starttls'] = 0;
$conf['referrals'] = 0;
+$conf['deref'] = 0;
$conf['binddn'] = '';
$conf['bindpw'] = '';
//$conf['mapping']['name'] unsupported in config manager
@@ -16,4 +17,4 @@ $conf['bindpw'] = '';
$conf['userscope'] = 'sub';
$conf['groupscope'] = 'sub';
$conf['groupkey'] = 'cn';
-$conf['debug'] = array('onoff'); \ No newline at end of file
+$conf['debug'] = 0; \ No newline at end of file
diff --git a/lib/plugins/authldap/conf/metadata.php b/lib/plugins/authldap/conf/metadata.php
index fc5b2e63c..a3256628c 100644
--- a/lib/plugins/authldap/conf/metadata.php
+++ b/lib/plugins/authldap/conf/metadata.php
@@ -8,6 +8,7 @@ $meta['groupfilter'] = array('string');
$meta['version'] = array('numeric');
$meta['starttls'] = array('onoff');
$meta['referrals'] = array('onoff');
+$meta['deref'] = array('multichoice','_choices' => array(0,1,2,3));
$meta['binddn'] = array('string');
$meta['bindpw'] = array('password');
//$meta['mapping']['name'] unsupported in config manager
diff --git a/lib/plugins/authldap/lang/en/settings.php b/lib/plugins/authldap/lang/en/settings.php
index ddedf8ae3..e3f385f99 100644
--- a/lib/plugins/authldap/lang/en/settings.php
+++ b/lib/plugins/authldap/lang/en/settings.php
@@ -8,9 +8,16 @@ $lang['groupfilter'] = 'LDAP filter to search for groups. Eg. <code>(&amp;(objec
$lang['version'] = 'The protocol version to use. You may need to set this to <code>3</code>';
$lang['starttls'] = 'Use TLS connections?';
$lang['referrals'] = 'Shall referrals be followed?';
+$lang['deref'] = 'How to dereference aliases?';
$lang['binddn'] = 'DN of an optional bind user if anonymous bind is not sufficient. Eg. <code>cn=admin, dc=my, dc=home</code>';
$lang['bindpw'] = 'Password of above user';
$lang['userscope'] = 'Limit search scope for user search';
$lang['groupscope'] = 'Limit search scope for group search';
-$lang['groupkey'] = 'Group member ship from any user attribute (instead of standard AD groups) e.g. group from department or telephone number';
+$lang['groupkey'] = 'Group membership from any user attribute (instead of standard AD groups) e.g. group from department or telephone number';
$lang['debug'] = 'Display additional debug information on errors';
+
+
+$lang['deref_o_0'] = 'LDAP_DEREF_NEVER';
+$lang['deref_o_1'] = 'LDAP_DEREF_SEARCHING';
+$lang['deref_o_2'] = 'LDAP_DEREF_FINDING';
+$lang['deref_o_3'] = 'LDAP_DEREF_ALWAYS'; \ No newline at end of file