X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fcommands%2Fweb%2Fclass_WebResendLinkCommand.php;h=c08066adc45a5e36c1ef9fe8a23162b9b6c94289;hp=887712e75f078900c01dde9d9d40cc04ae86746d;hb=5c3d5d84f8f862d0d51f095f9858860f86788ae8;hpb=b3e47fb693fb8d40868158b0192b3392b309d97a diff --git a/inc/classes/main/commands/web/class_WebResendLinkCommand.php b/inc/classes/main/commands/web/class_WebResendLinkCommand.php index 887712e..c08066a 100644 --- a/inc/classes/main/commands/web/class_WebResendLinkCommand.php +++ b/inc/classes/main/commands/web/class_WebResendLinkCommand.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright(c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software * @license GNU GPL 3.0 or any newer version * @link http://www.ship-simu.org * @@ -66,17 +66,20 @@ class WebResendLinkCommand extends BaseCommand implements Commandable { * @return void */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { - // Get a user instance from registry - $userInstance = Registry::getRegistry()->getInstance('user'); + // Get template instance + $templateInstance = $responseInstance->getTemplateInstance(); // Get a mailer class - $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class'); + $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class', array($templateInstance)); // Load the mail template - $mailerInstance->loadTemplate("resend_link"); + $mailerInstance->loadTemplate('resend_link'); + + // Get a user instance from registry + $userInstance = Registry::getRegistry()->getInstance('user'); // Add the recipient - $mailerInstance->addRecipientByUser($userInstance); + $mailerInstance->addRecipientByUserInstance($userInstance); // Set subject line from template $mailerInstance->setSubjectFromTemplate();