]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
go back to ensuring session
authorEvan Prodromou <evan@prodromou.name>
Fri, 20 Jun 2008 07:02:56 +0000 (03:02 -0400)
committerEvan Prodromou <evan@prodromou.name>
Fri, 20 Jun 2008 07:02:56 +0000 (03:02 -0400)
darcs-hash:20080620070256-84dde-215e2ccf2cc037208837353a3d979d69770301f6.gz

lib/util.php

index cb3d7e63cc122be842c2a80383e4623f4927a48f..e137799f2d34c31cd3187f2439f353c43683e0d6 100644 (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;
 }