ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
AuthenticatedSubjectPurge.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
28final readonly class AuthenticatedSubjectPurge
29{
30 public function __construct(
31 private Services $storage,
32 private AuthenticatedUserSubjectProvider $provider
33 ) {
34 }
35
36 public function purgeForUserId(int $user_id): void
37 {
38 if ($user_id <= 0) {
39 return;
40 }
41
42 $this->storage->purgeSubject($this->provider->subjectFor($user_id));
43 }
44}
__construct(private Services $storage, private AuthenticatedUserSubjectProvider $provider)
Names the fully authenticated ILIAS users as KeyValueStorage subjects; the subject id is the user id.
Entry point to the namespace-scoped key-value storages of ILIAS.
Definition: Services.php:34