function SessionManagerInterface::delete

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Session/SessionManagerInterface.php \Drupal\Core\Session\SessionManagerInterface::delete()
  2. 10 core/lib/Drupal/Core/Session/SessionManagerInterface.php \Drupal\Core\Session\SessionManagerInterface::delete()
  3. 9 core/lib/Drupal/Core/Session/SessionManagerInterface.php \Drupal\Core\Session\SessionManagerInterface::delete()
  4. 8.9.x core/lib/Drupal/Core/Session/SessionManagerInterface.php \Drupal\Core\Session\SessionManagerInterface::delete()

Ends a specific user's session(s).

Parameters

int $uid: User ID.

Deprecated

in drupal:11.4.0 and is removed from drupal:12.0.0. Use Drupal\user\UserSessionRepositoryInterface::deleteAll() instead.

See also

https://www.drupal.org/node/3570851

1 method overrides SessionManagerInterface::delete()
SessionManager::delete in core/lib/Drupal/Core/Session/SessionManager.php
Ends a specific user's session(s).

File

core/lib/Drupal/Core/Session/SessionManagerInterface.php, line 22

Class

SessionManagerInterface
Defines the session manager interface.

Namespace

Drupal\Core\Session

Code

public function delete($uid);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.