forked from GNUsocial/gnu-social
go back to ensuring session
darcs-hash:20080620070256-84dde-215e2ccf2cc037208837353a3d979d69770301f6.gz
This commit is contained in:
parent
2025169b50
commit
03dba4270a
11
lib/util.php
11
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user