summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-20 02:54:55 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-20 02:54:55 -0400
commit6f74a091e1b2972d991db1797ed060e0a22c6470 (patch)
treef413efd90f9aefba8564b69284baec5edb7c5f45 /lib
parentf72329a13d7061e891e8b778abe76408166346a9 (diff)
don't keep cached user
darcs-hash:20080620065455-84dde-0c3bd495205e49ba2c5a8e040495339f35f9b215.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 646d93c3b..a88327081 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -415,14 +415,14 @@ function common_set_user($nickname) {
# who is the current user?
function common_current_user() {
- static $user = NULL; # FIXME: global memcached
- if (is_null($user)) {
- common_ensure_session();
- $id = $_SESSION['userid'];
+ $user = NULL;
+ if (common_have_session()) {
+ $id = $_SESSION['userid'];
if ($id) {
$user = User::staticGet($id);
}
}
+
return $user;
}
@@ -899,4 +899,4 @@ function common_copy_args($from) {
$to[$k] = ($strip) ? stripslashes($v) : $v;
}
return $to;
-} \ No newline at end of file
+}