summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index 6d0790e9285..a491cb11c80 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -61,6 +61,7 @@
*
*/
+use OCP\Group\Events\UserRemovedEvent;
use OCP\ILogger;
use OCP\Share;
use OC\Encryption\HookManager;
@@ -897,8 +898,12 @@ class OC {
public static function registerShareHooks() {
if (\OC::$server->getSystemConfig()->getValue('installed')) {
OC_Hook::connect('OC_User', 'post_deleteUser', Hooks::class, 'post_deleteUser');
- OC_Hook::connect('OC_User', 'post_removeFromGroup', Hooks::class, 'post_removeFromGroup');
+ OC_Hook::connect('OC_User', 'post_removeFromGroup', Hooks::class, 'post_removeFromGroupLDAP');
OC_Hook::connect('OC_User', 'post_deleteGroup', Hooks::class, 'post_deleteGroup');
+
+ /** @var \OCP\EventDispatcher\IEventDispatcher $dispatcher */
+ $dispatcher = \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class);
+ $dispatcher->addServiceListener(UserRemovedEvent::class, \OC\Share20\UserRemovedListener::class);
}
}