public function SessionManager::delete in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Session/SessionManager.php \Drupal\Core\Session\SessionManager::delete()
Ends a specific user's session(s).
Parameters
int $uid: User ID.
Overrides SessionManagerInterface::delete
File
- core/
lib/ Drupal/ Core/ Session/ SessionManager.php, line 246 - Contains \Drupal\Core\Session\SessionManager.
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();
}