summaryrefslogtreecommitdiff
path: root/lib/plugins/authldap/auth.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2015-03-16 17:19:59 +0100
committerAndreas Gohr <andi@splitbrain.org>2015-03-16 17:19:59 +0100
commit43d45fd5a6522de02938136a7120874bd4abada8 (patch)
tree1058f5cd717461762f1eda842e58d4173404864e /lib/plugins/authldap/auth.php
parentf39cc3cb7ee042e2e3fde60dae4335da1d9a8c2d (diff)
parent84f66e9f97ebf4d78ffaaad7a0b44f5c0180bfc9 (diff)
downloadrpg-43d45fd5a6522de02938136a7120874bd4abada8.tar.gz
rpg-43d45fd5a6522de02938136a7120874bd4abada8.tar.bz2
Merge pull request #1073 from sklrrzn/master
Add two config options to authldap
Diffstat (limited to 'lib/plugins/authldap/auth.php')
-rw-r--r--lib/plugins/authldap/auth.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index 50735882f..9d031c049 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -37,7 +37,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
// Add the capabilities to change the password
- $this->cando['modPass'] = true;
+ $this->cando['modPass'] = $this->getConf('modPass');
}
/**
@@ -360,8 +360,9 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
$sr = ldap_search($this->con, $this->getConf('usertree'), $all_filter);
$entries = ldap_get_entries($this->con, $sr);
$users_array = array();
+ $userkey = $this->getConf('userkey');
for($i = 0; $i < $entries["count"]; $i++) {
- array_push($users_array, $entries[$i]["uid"][0]);
+ array_push($users_array, $entries[$i][$userkey][0]);
}
asort($users_array);
$result = $users_array;