ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilNotificationsAppEventListener.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24{
25 public static function handleEvent(string $component, string $event, array $parameter): void
26 {
27 if ($event === 'deleteUser') {
28 global $DIC;
29 $repo = new PushRepository($DIC->database(), new ilObjUser($parameter['usr_id']));
30 foreach ($repo->getUserSubscriptions() as $subscription) {
31 $repo->deleteSubscription($subscription->getAuth());
32 }
33 }
34 }
35}
static handleEvent(string $component, string $event, array $parameter)
Handle an event in a listener.
User class.
Interface for event handling.
global $DIC
Definition: shib_login.php:26