diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-06-20 03:02:56 -0400 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-06-20 03:02:56 -0400 |
commit | 03dba4270a6f4fe53582d1cce9d6c713cdcaa115 (patch) | |
tree | 3afc615ff18f8a72614abfc7dc2a4c6ce24519b0 | |
parent | 2025169b5040ebe57e98f701d2b4084736e48058 (diff) |
go back to ensuring session
darcs-hash:20080620070256-84dde-215e2ccf2cc037208837353a3d979d69770301f6.gz
-rw-r--r-- | lib/util.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/util.php b/lib/util.php index cb3d7e63c..e137799f2 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; } |