summaryrefslogtreecommitdiff
path: root/lib/plugins/authldap/auth.php
diff options
context:
space:
mode:
authorGerry Weißbach <gerry.w@gammaproduction.de>2014-12-22 10:31:30 +0100
committerGerry Weißbach <gerry.w@gammaproduction.de>2014-12-22 10:31:30 +0100
commit8da2ebf4f4261eb8f54df5704b5d9af283b5402d (patch)
tree9c63975e3898c949e1784e30e81a5ed3da7fca93 /lib/plugins/authldap/auth.php
parent5e7f4d50cbbc788c9c0483a0a2ff1b536e4ffe8c (diff)
parent1bf4abb07f65e28578bae98aad457cb768d8b44f (diff)
downloadrpg-8da2ebf4f4261eb8f54df5704b5d9af283b5402d.tar.gz
rpg-8da2ebf4f4261eb8f54df5704b5d9af283b5402d.tar.bz2
Merge remote-tracking branch 'splitbrain/master'
Diffstat (limited to 'lib/plugins/authldap/auth.php')
-rw-r--r--lib/plugins/authldap/auth.php30
1 files changed, 19 insertions, 11 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php
index 0d5e130ea..fd4729331 100644
--- a/lib/plugins/authldap/auth.php
+++ b/lib/plugins/authldap/auth.php
@@ -103,7 +103,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
return true;
} else {
// See if we can find the user
- $info = $this->getUserData($user, true);
+ $info = $this->_getUserData($user, true);
if(empty($info['dn'])) {
return false;
} else {
@@ -146,10 +146,19 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* @author Steffen Schoch <schoch@dsb.net>
*
* @param string $user
+ * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin
+ * @return array containing user data or false
+ */
+ public function getUserData($user, $requireGroups=true) {
+ return $this->_getUserData($user);
+ }
+
+ /**
+ * @param string $user
* @param bool $inbind authldap specific, true if in bind phase
* @return array containing user data or false
*/
- public function getUserData($user, $inbind = false) {
+ protected function _getUserData($user, $inbind = false) {
global $conf;
if(!$this->_openLDAP()) return false;
@@ -172,6 +181,7 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
}
}
+ $info = array();
$info['user'] = $user;
$info['server'] = $this->getConf('server');
@@ -555,15 +565,13 @@ class auth_plugin_authldap extends DokuWiki_Auth_Plugin {
* Wraps around ldap_search, ldap_list or ldap_read depending on $scope
*
* @author Andreas Gohr <andi@splitbrain.org>
- * @param resource $link_identifier
- * @param string $base_dn
- * @param string $filter
- * @param string $scope can be 'base', 'one' or 'sub'
- * @param null $attributes
- * @param int $attrsonly
- * @param int $sizelimit
- * @param int $timelimit
- * @param int $deref
+ * @param resource $link_identifier
+ * @param string $base_dn
+ * @param string $filter
+ * @param string $scope can be 'base', 'one' or 'sub'
+ * @param null|array $attributes
+ * @param int $attrsonly
+ * @param int $sizelimit
* @return resource
*/
protected function _ldapsearch($link_identifier, $base_dn, $filter, $scope = 'sub', $attributes = null,