protected SessionManager::startNow()
Forcibly start a PHP session.
Return value
bool TRUE if the session is started.
File
- core/lib/Drupal/Core/Session/SessionManager.php, line 153
Class
- SessionManager
- Manages user sessions.
Namespace
Drupal\Core\Session
Code
protected function startNow() {
if ($this->isCli()) {
return FALSE;
}
if ($this->startedLazy) {
// Save current session data before starting it, as PHP will destroy it.
$session_data = $_SESSION;
}
$result = parent::start();
// Restore session data.
if ($this->startedLazy) {
$_SESSION = $session_data;
$this->loadSession();
}
return $result;
}
Please login to continue.