From 49481f68f4573b862aa184a46690d1ec987dd244 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 18 Aug 2006 19:24:52 +0000 Subject: [PATCH] - Patch #79166 by hunmonk: fixed session breakage. --- includes/bootstrap.inc | 3 ++- includes/session.inc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 1aa6e8d2698..56a8d8b3b60 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -615,12 +615,13 @@ function drupal_is_denied($type, $mask) { * * @return Object - the user object. */ -function drupal_anonymous_user() { +function drupal_anonymous_user($session = '') { $user = new stdClass(); $user->uid = 0; $user->hostname = $_SERVER['REMOTE_ADDR']; $user->roles = array(); $user->roles[DRUPAL_ANONYMOUS_RID] = 'anonymous user'; + $user->session = $session; return $user; } diff --git a/includes/session.inc b/includes/session.inc index 42f5e826b18..78ec82051b0 100644 --- a/includes/session.inc +++ b/includes/session.inc @@ -41,7 +41,7 @@ function sess_read($key) { } // We didn't find the client's record (session has expired), or they are an anonymous user. else { - $user = drupal_anonymous_user(); + $user = drupal_anonymous_user($user->session); } return $user->session;