class UserSessionRepository
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Session/UserSessionRepository.php \Drupal\Core\Session\UserSessionRepository
Provides the default user session repository.
Hierarchy
- class \Drupal\Core\Session\UserSessionRepository implements \Drupal\Core\Session\UserSessionRepositoryInterface
Expanded class hierarchy of UserSessionRepository
1 string reference to 'UserSessionRepository'
- core.services.yml in core/
core.services.yml - core/core.services.yml
1 service uses UserSessionRepository
File
-
core/
lib/ Drupal/ Core/ Session/ UserSessionRepository.php, line 12
Namespace
Drupal\Core\SessionView source
readonly class UserSessionRepository implements UserSessionRepositoryInterface {
public function __construct(protected Connection $connection) {
}
/**
* {@inheritdoc}
*/
public function deleteAll(int $uid) : void {
try {
// Delete session data.
$this->connection
->delete('sessions')
->condition('uid', $uid)
->execute();
} catch (\Exception) {
}
}
}
Members
| Title Sort descending | Modifiers | Object type | Summary |
|---|---|---|---|
| UserSessionRepository::deleteAll | public | function | |
| UserSessionRepository::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.