summaryrefslogtreecommitdiff
path: root/inc/auth
diff options
context:
space:
mode:
authorjoe.lapp <joe.lapp@pobox.com>2005-09-16 22:55:57 +0200
committerjoe.lapp <joe.lapp@pobox.com>2005-09-16 22:55:57 +0200
commit7c759785e2712fb0759706f8f46ebaa8c6dc8ccc (patch)
tree2d5724487f45dfd3a20c88d8451f2b03f49dc637 /inc/auth
parent7a98db204d43c43f79d2b8897adb5f0536b37f28 (diff)
downloadrpg-7c759785e2712fb0759706f8f46ebaa8c6dc8ccc.tar.gz
rpg-7c759785e2712fb0759706f8f46ebaa8c6dc8ccc.tar.bz2
auth_getUserData() now caches user info in a static
darcs-hash:20050916205557-36b45-4135c42d0ccfd28c85cfbd7eb57a445c2aa74ffc.gz
Diffstat (limited to 'inc/auth')
-rw-r--r--inc/auth/plain.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/auth/plain.php b/inc/auth/plain.php
index 6178f1260..d9569c3fd 100644
--- a/inc/auth/plain.php
+++ b/inc/auth/plain.php
@@ -45,7 +45,11 @@ function auth_checkPass($user,$pass){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function auth_getUserData($user){
- $users = auth_plain_loadUserData();
+ static $users = null;
+
+ if($users == null) {
+ $users = auth_plain_loadUserData();
+ }
return $users[$user];
}