From 2046a6546c8ed62b9a7b33305b6201458f2f8291 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 12 Mar 2014 15:38:28 +0000 Subject: Allow user info to be retrieved without groups Some parts of dokuwiki (e.g. recent changes, old revisions) can requests lots of user info (to provide editor names) without requiring any group information. This change also implements caching of user info by authmysql & authpgsql plugins to avoid repeated querying of the DB to retrieve the same user information. --- lib/plugins/authad/auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/plugins/authad/auth.php') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 0860e5756..a3119dda6 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -177,9 +177,10 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * * @author James Van Lommel * @param string $user + * @param bool $requireGroups (optional) - ignored, groups are always supplied by this plugin * @return array */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { global $conf; global $lang; global $ID; -- cgit v1.2.3 From 59bc3b48fdffb76ee65a4b630be3ffa1f6c20c80 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Mon, 29 Sep 2014 21:45:27 +0200 Subject: more scrutinizer issue improvements --- lib/plugins/authad/auth.php | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/plugins/authad/auth.php') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index a3119dda6..65f0b1647 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -203,6 +203,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { } //general user info + $info = array(); $info['name'] = $result[0]['displayname'][0]; $info['mail'] = $result[0]['mail'][0]; $info['uid'] = $result[0]['samaccountname'][0]; -- cgit v1.2.3 From 253d4b48ec708eb42033862dc15c8576f44a48ed Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Wed, 1 Oct 2014 15:32:05 +0200 Subject: more PHPDocs, unused var, small bit code reformatting --- lib/plugins/authad/auth.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/plugins/authad/auth.php') diff --git a/lib/plugins/authad/auth.php b/lib/plugins/authad/auth.php index 65f0b1647..88b56046c 100644 --- a/lib/plugins/authad/auth.php +++ b/lib/plugins/authad/auth.php @@ -329,6 +329,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * Bulk retrieval of user data * * @author Dominik Eckelmann + * * @param int $start index of first user to be returned * @param int $limit max number of users to be returned * @param array $filter array of field/pattern pairs, null for no filter @@ -447,7 +448,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { /** * Get the domain part from a user * - * @param $user + * @param string $user * @return string */ public function _userDomain($user) { @@ -458,7 +459,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { /** * Get the user part from a user * - * @param $user + * @param string $user * @return string */ public function _userName($user) { @@ -544,6 +545,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * The patterns are set up with $this->_constructPattern() * * @author Chris Smith + * * @param string $user * @param array $info * @return bool @@ -565,6 +567,7 @@ class auth_plugin_authad extends DokuWiki_Auth_Plugin { * Create a pattern for $this->_filter() * * @author Chris Smith + * * @param array $filter */ protected function _constructPattern($filter) { -- cgit v1.2.3