- Patch #79166 by hunmonk: fixed session breakage.
parent
5b825a7bfe
commit
49481f68f4
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue