Browse Source

Merge branch 'develop'

master
Guillaume Bourgeois 4 months ago
parent
commit
7868281f62
2 changed files with 7 additions and 5 deletions
  1. +5
    -3
      producer/controllers/NewsletterController.php
  2. +2
    -2
      producer/views/newsletter/index.php

+ 5
- 3
producer/controllers/NewsletterController.php View File

@@ -94,10 +94,12 @@ class NewsletterController extends ProducerBaseController
return $this->redirectProducerLoginFrontend('unsubscribe');
}

$userModule = $this->getUserModule();
$newsletterManager = $this->getUserModule()->getNewsletterManager();
$userCurrent = $this->getUserCurrent();
$userModule->unsubscribeUserNewsletter($userCurrent);
//$this->setFlash('success', "<i class=\"bi bi-check2-square\"></i> Votre désinscription a bien été prise en compte, vous ne recevrez plus d'infolettre de la part de ce producteur.");
$newsletterManager->unsubscribeUserNewsletter($userCurrent, Email::TYPE_NEWSLETTER);
$newsletterManager->unsubscribeUserNewsletter($userCurrent, Email::TYPE_ORDER_TAKING);
$this->setFlash('success', "<i class=\"bi bi-check2-square\"></i> Votre désinscription a bien été prise en compte, vous ne recevrez plus d'emails de la part de ce producteur.");

return $this->redirect('index');
}


+ 2
- 2
producer/views/newsletter/index.php View File

@@ -75,8 +75,8 @@ $this->setTitle("Infolettres");
[
'options' => [
'data-id' => $user->id,
'data-on' => 'Activé',
'data-off' => 'Désactivé'
'data-on' => 'Activée',
'data-off' => 'Désactivée'
],
])
->label('Emails de prise de commande');

Loading…
Cancel
Save