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 /inc | |
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 'inc')
-rw-r--r-- | inc/auth.php | 6 | ||||
-rw-r--r-- | inc/common.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/inc/auth.php b/inc/auth.php index 2bdc3eb00..cbdd7163b 100644 --- a/inc/auth.php +++ b/inc/auth.php @@ -922,7 +922,7 @@ function auth_sendPassword($user, $password) { if(!$auth) return false; $user = $auth->cleanUser($user); - $userinfo = $auth->getUserData($user); + $userinfo = $auth->getUserData($user, DokuWiki_Auth_Plugin::IGNORE_GROUPS); if(!$userinfo['mail']) return false; @@ -1184,7 +1184,7 @@ function act_resendpwd() { } $user = io_readfile($tfile); - $userinfo = $auth->getUserData($user); + $userinfo = $auth->getUserData($user, DokuWiki_Auth_Plugin::IGNORE_GROUPS); if(!$userinfo['mail']) { msg($lang['resendpwdnouser'], -1); return false; @@ -1236,7 +1236,7 @@ function act_resendpwd() { $user = trim($auth->cleanUser($INPUT->post->str('login'))); } - $userinfo = $auth->getUserData($user); + $userinfo = $auth->getUserData($user, DokuWiki_Auth_Plugin::IGNORE_GROUPS); if(!$userinfo['mail']) { msg($lang['resendpwdnouser'], -1); return false; diff --git a/inc/common.php b/inc/common.php index 9fbebde94..6851cdea3 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1467,7 +1467,7 @@ function editorinfo($username) { case 'username': case 'email': case 'email_link': - if($auth) $info = $auth->getUserData($username); + if($auth) $info = $auth->getUserData($username, DokuWiki_Auth_Plugin::IGNORE_GROUPS); break; default: return hsc($username); |