summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Share20/Manager.php3
1 files changed, 2 insertions, 1 deletions
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());