-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Description
Please use:
OCP\Group\Events\GroupDeletedEventfor'OC_User', 'post_deleteGroup'OCP\User\Events\UserDeletedEventfor'OC_User', 'post_deleteUser'
use OCP\Group\Events\GroupDeletedEvent;
use OCA\Circles\Listener\ GroupDeletedListener;
...
$dispatcher = $this->get(IEventDispatcher::class);
$dispatcher->addServiceListener(GroupDeletedEvent::class, GroupDeletedListener::class);Ideally this happens in the register() method of the application. (see https://github.com/nextcloud/server/blob/bd6a6cf3bff74dc5690fe032a4203165227f01d2/apps/user_status/lib/AppInfo/Application.php#L70 for an example)
See https://github.com/nextcloud/server/blob/caff1023ea72bb2ea94130e18a2a6e2ccf819e5f/apps/files_sharing/lib/Listener/UserAddedToGroupListener.php for example how the listener can look like.
Those hooks will be dropped in Nextcloud 21 and you can use the new system in all versions starting from Nextcloud 17.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels