aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2023-07-20 15:42:26 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-08-10 10:57:32 +0200
commit34fa4138fb5c5f4e469d0b74b8773ce5d5f34609 (patch)
tree2b49a6c88459fa71614a9abf2607e8e41a566aea /apps/user_ldap
parentd9b368062edc07f665c1804dfb8b3507814f9fb3 (diff)
downloadnextcloud-server-34fa4138fb5c5f4e469d0b74b8773ce5d5f34609.tar.gz
nextcloud-server-34fa4138fb5c5f4e469d0b74b8773ce5d5f34609.zip
Add group events to UpdateGroups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Jobs/UpdateGroups.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/Jobs/UpdateGroups.php b/apps/user_ldap/lib/Jobs/UpdateGroups.php
index 2c3ce457cff..1ae8e5fcd6b 100644
--- a/apps/user_ldap/lib/Jobs/UpdateGroups.php
+++ b/apps/user_ldap/lib/Jobs/UpdateGroups.php
@@ -189,6 +189,10 @@ class UpdateGroups extends TimedJob {
foreach ($users as $user) {
$this->groupMembershipMapper->insert(GroupMembership::fromParams(['groupid' => $createdGroup,'userid' => $user]));
}
+ $groupObject = $this->groupManager->get($group);
+ if ($groupObject instanceof IGroup) {
+ $this->dispatcher->dispatchTyped(new GroupCreatedEvent($groupObject));
+ }
}
$this->logger->debug(
'bgJ "updateGroups" – FINISHED dealing with created Groups.',
@@ -207,6 +211,9 @@ class UpdateGroups extends TimedJob {
);
$this->groupMembershipMapper->deleteGroups($removedGroups);
+
+ //TODO find a way to dispatch GroupDeletedEvent
+
$this->logger->info(
'bgJ "updateGroups" – groups {removedGroups} were removed.',
[