diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2014-03-12 15:38:28 +0000 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2014-03-12 17:47:43 +0000 |
commit | 2046a6546c8ed62b9a7b33305b6201458f2f8291 (patch) | |
tree | 47fda0d8608fd1c96d9db755feef8a0d8dc9b4f8 /lib/plugins/auth.php | |
parent | d397e6da631cb6d262ad14ec7b46b75d1b60fbcf (diff) | |
download | rpg-2046a6546c8ed62b9a7b33305b6201458f2f8291.tar.gz rpg-2046a6546c8ed62b9a7b33305b6201458f2f8291.tar.bz2 |
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.
Diffstat (limited to 'lib/plugins/auth.php')
-rw-r--r-- | lib/plugins/auth.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/plugins/auth.php b/lib/plugins/auth.php index b04735639..f9e5cded9 100644 --- a/lib/plugins/auth.php +++ b/lib/plugins/auth.php @@ -15,6 +15,9 @@ if(!defined('DOKU_INC')) die(); class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { public $success = true; + const IGNORE_GROUPS = false; + const REQUIRE_GROUPS = true; + /** * Possible things an auth backend module may be able to * do. The things a backend can do need to be set to true @@ -234,9 +237,10 @@ class DokuWiki_Auth_Plugin extends DokuWiki_Plugin { * * @author Andreas Gohr <andi@splitbrain.org> * @param string $user the user name + * @param bool $requireGroups whether or not the returned data must include groups * @return array containing user data or false */ - public function getUserData($user) { + public function getUserData($user, $requireGroups=true) { if(!$this->cando['external']) msg("no valid authorisation system in use", -1); return false; } |