X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fclasses%2Fmain%2Fcommands%2Fweb%2Fclass_WebResendLinkCommand.php;h=c08066adc45a5e36c1ef9fe8a23162b9b6c94289;hb=5c3d5d84f8f862d0d51f095f9858860f86788ae8;hp=b24e7d6d2186ddc6442f3c2f7da3ed1bb67c2c7d;hpb=ba9c65f936c374390a63226533172121b9ae3f45;p=shipsimu.git diff --git a/inc/classes/main/commands/web/class_WebResendLinkCommand.php b/inc/classes/main/commands/web/class_WebResendLinkCommand.php index b24e7d6..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'); + // 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();