From: Evan Prodromou Date: Fri, 20 Jun 2008 07:02:56 +0000 (-0400) Subject: go back to ensuring session X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=03dba4270a6f4fe53582d1cce9d6c713cdcaa115;p=quix0rs-gnu-social.git go back to ensuring session darcs-hash:20080620070256-84dde-215e2ccf2cc037208837353a3d979d69770301f6.gz --- 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; }