Commit c5d3b91c authored by tguillon's avatar tguillon
Browse files

Ajout envoie de mail lors du retour de consultation

Ajout envoie de mail lors de l'insertion au registre.
Correction du sujet du mail envoyé.
parent 0138c8dc
......@@ -82,7 +82,7 @@ class NotificationsComponent extends Component {
$Email = new CakeEmail();
$Email->config('email');
$Email->to($userInfo['User']['email']);
$Email->subject('Nouvelle notification');
$Email->subject('Nouvelle notification sur web-DPO');
$Email->send('Vous avez reçu une nouvelle notification sur web-DPO');
}
}
......
......@@ -641,6 +641,10 @@ class EtatFichesController extends AppController {
]
]);
$success = $success && false !== $this->Notification->save();
if ($success === true) {
$this->Notifications->sendEmail($this->request->data['EtatFiche']['previousUserId']);
}
}
}
}
......@@ -982,6 +986,10 @@ class EtatFichesController extends AppController {
]
]);
$success = $success && false !== $this->Notification->save();
if ($success === true) {
$this->Notifications->sendEmail($idEncoursValid['Fiche']['user_id']);
}
if ($success == true) {
$this->Historique->create([
......
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