diff --git a/gestion/lib/Controller/InvoiceController.php b/gestion/lib/Controller/InvoiceController.php index 2dfbe6d..b07492d 100644 --- a/gestion/lib/Controller/InvoiceController.php +++ b/gestion/lib/Controller/InvoiceController.php @@ -109,7 +109,7 @@ class InvoiceController extends Controller $message->attach($content); $message->setSubject("Facture"); - $signature = $this->mailerService->getFooterContent(); + $signature = $this->mailerService->getFooterContent($this->getUserNameForEmailSignature()); $message->setHtmlBody( "
Bonjour.
". @@ -126,4 +126,10 @@ class InvoiceController extends Controller } return new DataResponse("E-mail envoyé avec succès à ".$email.".", 200, ['Content-Type' => 'application/json']); } + + public function getUserNameForEmailSignature (){ + $configs = json_decode($this->gestionRepository->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD)); + $currentConfig = $configs[0]; + return $currentConfig->nom . " " . $currentConfig->prenom; + } } \ No newline at end of file diff --git a/gestion/lib/Controller/PageController.php b/gestion/lib/Controller/PageController.php index 957dc86..63df257 100644 --- a/gestion/lib/Controller/PageController.php +++ b/gestion/lib/Controller/PageController.php @@ -1636,7 +1636,7 @@ class PageController extends Controller { } } public function getUserNameForEmailSignature (){ - $configs = json_decode($this->myDb->getConfiguration(self::DEFAULT_NEXTCLOUD_ADMIN)); + $configs = json_decode($this->myDb->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD)); $currentConfig = $configs[0]; return $currentConfig->nom . " " . $currentConfig->prenom; }