diff options
author | Sascha Klopp <klopp@rrzn.uni-hannover.de> | 2015-03-03 11:09:21 +0100 |
---|---|---|
committer | Sascha Klopp <klopp@rrzn.uni-hannover.de> | 2015-03-03 11:09:21 +0100 |
commit | 6619ddf4b04390e1d1273dd79bd16bfb9eb6cf89 (patch) | |
tree | 48f65999d6ec45e5cedf376b2693b8b6518c38c0 /lib/plugins/authldap/auth.php | |
parent | 2f63e920cb57e8162f5460d01717e827e74ea8de (diff) | |
download | rpg-6619ddf4b04390e1d1273dd79bd16bfb9eb6cf89.tar.gz rpg-6619ddf4b04390e1d1273dd79bd16bfb9eb6cf89.tar.bz2 |
Two new authldap config options: 'userkey' denotes the LDAP
attribute holding the username, 'modPass' allows to disable
password changing by the user.
Diffstat (limited to 'lib/plugins/authldap/auth.php')
-rw-r--r-- | lib/plugins/authldap/auth.php | 5 |
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; |