W3cubDocs

/Drupal 8

protected function SessionManager::isSessionObsolete

protected SessionManager::isSessionObsolete()

Determines whether the session contains user data.

Return value

bool TRUE when the session does not contain any values and therefore can be destroyed.

File

core/lib/Drupal/Core/Session/SessionManager.php, line 292

Class

SessionManager
Manages user sessions.

Namespace

Drupal\Core\Session

Code

protected function isSessionObsolete() {
  $used_session_keys = array_filter($this->getSessionDataMask());
  return empty($used_session_keys);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Session!SessionManager.php/function/SessionManager::isSessionObsolete/8.1.x