function UserSessionRepository::deleteAll

Same name and namespace in other branches
  1. main core/lib/Drupal/Core/Session/UserSessionRepository.php \Drupal\Core\Session\UserSessionRepository::deleteAll()

File

core/lib/Drupal/Core/Session/UserSessionRepository.php, line 20

Class

UserSessionRepository
Provides the default user session repository.

Namespace

Drupal\Core\Session

Code

public function deleteAll(int $uid) : void {
  try {
    // Delete session data.
    $this->connection
      ->delete('sessions')
      ->condition('uid', $uid)
      ->execute();
  } catch (\Exception) {
  }
}

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