summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlezvous.ca>2008-06-23 23:49:06 -0400
committerEvan Prodromou <evan@controlezvous.ca>2008-06-23 23:49:06 -0400
commit1db5ba05763f75f47fd9bc510c14691b3e7969de (patch)
treebd9d8d78fa5b58d97c064213ebd8cd864748ef0d /lib
parent25a6f240a4549cdccc677abb988b21d1d1a9f1c5 (diff)
check session name COOKIE before ensuring session
darcs-hash:20080624034906-34904-a21bab1db498d69c616606126f6b788a2188b1e2.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/util.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/util.php b/lib/util.php
index b506a8058..0502ce797 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -506,15 +506,15 @@ function common_forgetme() {
# who is the current user?
function common_current_user() {
-
- common_ensure_session();
- $id = $_SESSION['userid'];
- if ($id) {
- # note: this should cache
- $user = User::staticGet($id);
- return $user;
+ if ($_REQUEST[session_name()]) {
+ common_ensure_session();
+ $id = $_SESSION['userid'];
+ if ($id) {
+ # note: this should cache
+ $user = User::staticGet($id);
+ return $user;
+ }
}
-
# that didn't work; try to remember
$user = common_remembered_user();
return $user;