diff options
-rw-r--r-- | lib/base.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/base.php b/lib/base.php index 667202d3aef..7d7e690aa6f 100644 --- a/lib/base.php +++ b/lib/base.php @@ -542,10 +542,12 @@ class OC { * register hooks for sharing */ public static function registerShareHooks() { - OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser'); - OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup'); - OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup'); - OC_Hook::connect('OC_User', 'post_deleteGroup', 'OCP\Share', 'post_deleteGroup'); + if(\OC_Config::getValue('installed')) { + OC_Hook::connect('OC_User', 'post_deleteUser', 'OCP\Share', 'post_deleteUser'); + OC_Hook::connect('OC_User', 'post_addToGroup', 'OCP\Share', 'post_addToGroup'); + OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OCP\Share', 'post_removeFromGroup'); + OC_Hook::connect('OC_User', 'post_deleteGroup', 'OCP\Share', 'post_deleteGroup'); + } } /** |