go back to ensuring session

darcs-hash:20080620070256-84dde-215e2ccf2cc037208837353a3d979d69770301f6.gz
This commit is contained in:
Evan Prodromou 2008-06-20 03:02:56 -04:00
parent 2025169b50
commit 03dba4270a
1 changed files with 4 additions and 7 deletions

View File

@ -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;
}