From e7959f4fd23ff3354db7b876db2c3e595044bc4c Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Fri, 30 Aug 2013 16:52:06 +0200
Subject: [PATCH] don't send mail to the user who shared the file

---
 core/ajax/share.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/ajax/share.php b/core/ajax/share.php
index 76a67f5472..0cf4b246f9 100644
--- a/core/ajax/share.php
+++ b/core/ajax/share.php
@@ -103,6 +103,9 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
 				$recipientList = \OC_Group::usersInGroup($recipient);
 			}
 
+			// don't send a mail to the user who shared the file
+			array_diff($recipientList, [\OCP\User::getUser()]);
+
 			// send mail to all recipients with an email address
 			foreach ($recipientList as $recipient) {
 				//get correct target folder name
-- 
GitLab