function SessionManager::delete
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Session/SessionManager.php \Drupal\Core\Session\SessionManager::delete()
- 10 core/lib/Drupal/Core/Session/SessionManager.php \Drupal\Core\Session\SessionManager::delete()
- 11.x core/lib/Drupal/Core/Session/SessionManager.php \Drupal\Core\Session\SessionManager::delete()
Overrides SessionManagerInterface::delete
File
-
core/
lib/ Drupal/ Core/ Session/ SessionManager.php, line 231
Class
- SessionManager
- Manages user sessions.
Namespace
Drupal\Core\SessionCode
public function delete($uid) {
// Nothing to do if we are not allowed to change the session.
if (!$this->writeSafeHandler
->isSessionWritable() || $this->isCli()) {
return;
}
$this->connection
->delete('sessions')
->condition('uid', $uid)
->execute();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.