From 03dba4270a6f4fe53582d1cce9d6c713cdcaa115 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 20 Jun 2008 03:02:56 -0400 Subject: [PATCH] go back to ensuring session darcs-hash:20080620070256-84dde-215e2ccf2cc037208837353a3d979d69770301f6.gz --- lib/util.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/util.php b/lib/util.php index cb3d7e63cc..e137799f2d 100644 --- a/lib/util.php +++ b/lib/util.php @@ -415,14 +415,11 @@ function common_set_user($nickname) { # who is the current user? function common_current_user() { - $user = NULL; - if (common_have_session()) { - $id = $_SESSION['userid']; - if ($id) { - $user = User::staticGet($id); - } + common_ensure_session(); + $id = $_SESSION['userid']; + if ($id) { + $user = User::staticGet($id); } - return $user; } -- 2.39.5