Commit 1738502b authored by Johannes's avatar Johannes Committed by Johannes

Use sendEmailIfGroupHasNoAdmin() last admin got deleted via group admin tool

parent 68403faa
...@@ -26,6 +26,7 @@ use Foodsharing\Modules\Store\StoreModel; ...@@ -26,6 +26,7 @@ use Foodsharing\Modules\Store\StoreModel;
use Foodsharing\Modules\Store\TeamStatus; use Foodsharing\Modules\Store\TeamStatus;
use Foodsharing\Permissions\StorePermissions; use Foodsharing\Permissions\StorePermissions;
use Foodsharing\Services\ImageService; use Foodsharing\Services\ImageService;
use Foodsharing\Services\NotificationService;
use Foodsharing\Services\SanitizerService; use Foodsharing\Services\SanitizerService;
use Intervention\Image\ImageManager; use Intervention\Image\ImageManager;
use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\JsonResponse;
...@@ -57,6 +58,7 @@ class XhrMethods ...@@ -57,6 +58,7 @@ class XhrMethods
private $dataHelper; private $dataHelper;
private $translationHelper; private $translationHelper;
private $newsletterEmailPermissions; private $newsletterEmailPermissions;
private $notificationService;
/** /**
* XhrMethods constructor. * XhrMethods constructor.
...@@ -86,7 +88,8 @@ class XhrMethods ...@@ -86,7 +88,8 @@ class XhrMethods
IdentificationHelper $identificationHelper, IdentificationHelper $identificationHelper,
DataHelper $dataHelper, DataHelper $dataHelper,
TranslationHelper $translationHelper, TranslationHelper $translationHelper,
NewsletterEmailPermissions $newsletterEmailPermissions NewsletterEmailPermissions $newsletterEmailPermissions,
NotificationService $notificationService
) { ) {
$this->mem = $mem; $this->mem = $mem;
$this->session = $session; $this->session = $session;
...@@ -111,6 +114,7 @@ class XhrMethods ...@@ -111,6 +114,7 @@ class XhrMethods
$this->dataHelper = $dataHelper; $this->dataHelper = $dataHelper;
$this->translationHelper = $translationHelper; $this->translationHelper = $translationHelper;
$this->newsletterEmailPermissions = $newsletterEmailPermissions; $this->newsletterEmailPermissions = $newsletterEmailPermissions;
$this->notificationService = $notificationService;
} }
public function xhr_verify($data) public function xhr_verify($data)
...@@ -1374,6 +1378,7 @@ class XhrMethods ...@@ -1374,6 +1378,7 @@ class XhrMethods
$this->sanitizerService->handleTagSelect('botschafter'); $this->sanitizerService->handleTagSelect('botschafter');
$this->regionGateway->update_bezirkNew($data['bezirk_id'], $g_data); $this->regionGateway->update_bezirkNew($data['bezirk_id'], $g_data);
$this->notificationService->sendEmailIfGroupHasNoAdmin($data['bezirk_id']);
return json_encode(array( return json_encode(array(
'status' => 1, 'status' => 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment