aboutsummaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-07 21:17:25 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-07-30 10:21:08 +0200
commit36ee37ec0af53b9b01612b2ce335e5aa9590d024 (patch)
tree5e523263051fe065d9caa02a5d75b6d49a155123 /lib/base.php
parent788366500d10a018845390c51e9f60b331e7cc48 (diff)
downloadnextcloud-server-36ee37ec0af53b9b01612b2ce335e5aa9590d024.tar.gz
nextcloud-server-36ee37ec0af53b9b01612b2ce335e5aa9590d024.zip
Migrate OC_Group post_removeFromGroup hook to actual event object
Ref #14552 This adds a BeforeUserRemovedEvent to the LDAP backend because it was missing. It's not really before, but we don't have the before state. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php
index a491cb11c80..8b8e8e5fe32 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -61,6 +61,7 @@
*
*/
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Group\Events\UserRemovedEvent;
use OCP\ILogger;
use OCP\Share;
@@ -898,11 +899,10 @@ 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_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);
+ /** @var IEventDispatcher $dispatcher */
+ $dispatcher = \OC::$server->get(IEventDispatcher::class);
$dispatcher->addServiceListener(UserRemovedEvent::class, \OC\Share20\UserRemovedListener::class);
}
}