function drupal_save_session in Session Proxy 7
Determines 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.
File
- ./
session.inc, line 119 - User session proxy to an advanced component-based interface.
Code
function drupal_save_session($status = NULL) {
$helper = SessionProxy_Helper::getInstance()
->getBackend();
if (isset($status)) {
if ($status) {
$helper
->writeEnable();
}
else {
$helper
->writeDisable();
}
}
return $helper
->isWriteEnabled();
}