From c8f175e936ac33d81bcc9353845b69047da1c00f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 19 Aug 2020 09:03:58 +0200 Subject: Allow to disable share emails Signed-off-by: Joas Schilling --- lib/private/Share20/Manager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/private') diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 3b022f5951c..e07cda518d5 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -805,7 +805,8 @@ class Manager implements IManager { $this->dispatcher->dispatchTyped(new Share\Events\ShareCreatedEvent($share)); - if ($share->getShareType() === IShare::TYPE_USER) { + if ($this->config->getSystemValueBool('sharing.enable_share_mail', true) + && $share->getShareType() === IShare::TYPE_USER) { $mailSend = $share->getMailSend(); if ($mailSend === true) { $user = $this->userManager->get($share->getSharedWith()); -- cgit v1.2.3