mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #22300 from nextcloud/backport/22297/stable19
[stable19] Allow to disable share emails
This commit is contained in:
commit
f2279fb345
2 changed files with 7 additions and 1 deletions
|
|
@ -1385,6 +1385,11 @@ $CONFIG = [
|
|||
*/
|
||||
'sharing.force_share_accept' => false,
|
||||
|
||||
/**
|
||||
* Set to false to stop sending a mail when users receive a share
|
||||
*/
|
||||
'sharing.enable_share_mail' => true,
|
||||
|
||||
|
||||
/**
|
||||
* All other configuration options
|
||||
|
|
|
|||
|
|
@ -805,7 +805,8 @@ class Manager implements IManager {
|
|||
|
||||
$this->dispatcher->dispatchTyped(new Share\Events\ShareCreatedEvent($share));
|
||||
|
||||
if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
|
||||
if ($this->config->getSystemValueBool('sharing.enable_share_mail', true)
|
||||
&& $share->getShareType() === \OCP\Share::SHARE_TYPE_USER) {
|
||||
$mailSend = $share->getMailSend();
|
||||
if ($mailSend === true) {
|
||||
$user = $this->userManager->get($share->getSharedWith());
|
||||
|
|
|
|||
Loading…
Reference in a new issue