Community Documentation

session_save_session

5 session.inc session_save_session($status = NULL)
6 session.inc session_save_session($status = NULL)

Determine whether to save session data of the current request.

This function allows the caller to temporarily disable writing of session data, should the request end while performing potentially dangerous operations, such as manipulating the global $user object. See http://drupal.org/node/218104 for usage

Parameters

$status: Disables writing of session data when FALSE, (re-)enables writing when TRUE.

Return value

FALSE if writing session data has been disabled. Otherwise, TRUE.

▾ 1 function calls session_save_session()

sess_write in includes/session.inc
Writes an entire session to the database (internal use only).

File

includes/session.inc, line 203
User session handling functions.

Code

<?php
function session_save_session($status = NULL) {
  static $save_session = TRUE;
  if (isset($status)) {
    $save_session = $status;
  }
  return ($save_session);
}
?>

Comments

Note that

Note that session_save_session changed to drupal_save_session in D7 http://api.drupal.org/api/drupal/includes--session.inc/function/drupal_s...

Login or register to post comments