summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-08-19 09:50:42 +0200
committerGitHub <noreply@github.com>2020-08-19 09:50:42 +0200
commit4ff492a4927accb2e09559467477a1815c90593b (patch)
treecb97f3ce7e7deac55afed4c7bf03247416b1bd1b /lib/private
parent746e3f174fcd45ff5b6234263dc6371f9573a237 (diff)
parentc8f175e936ac33d81bcc9353845b69047da1c00f (diff)
downloadnextcloud-server-4ff492a4927accb2e09559467477a1815c90593b.tar.gz
nextcloud-server-4ff492a4927accb2e09559467477a1815c90593b.zip
Merge pull request #22297 from nextcloud/feature/15929/allow-to-disable-share-emails
Allow to disable share emails
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());