/**
* Creates an instance of this class
*
- * @param $resolverInstance An instance of a command resolver class
- * @return $commandInstance An instance a prepared command class
+ * @param $resolverInstance An instance of a command resolver class
+ * @return $commandInstance An instance a prepared command class
*/
public final static function createWebResendLinkCommand (CommandResolver $resolverInstance) {
// Get new instance
/**
* Executes the given command with given request and response objects
*
- * @param $requestInstance An instance of a class with an Requestable interface
- * @param $responseInstance An instance of a class with an Responseable interface
+ * @param $requestInstance An instance of a class with an Requestable interface
+ * @param $responseInstance An instance of a class with an Responseable interface
* @return void
*/
public function execute (Requestable $requestInstance, Responseable $responseInstance) {
- $this->debugInstance();
+ // Get a user instance from registry
+ $userInstance = Registry::getRegistry()->getInstance('user');
+
+ // Get a mailer class
+ $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class');
+
+ // Load the mail template
+ $mailerInstance->loadTemplate("resend_link");
+
+ // Add the recipient
+ $mailerInstance->addRecipientByUser($userInstance);
+
+ // Set subject line from template
+ $mailerInstance->setSubjectFromTemplate();
+
+ // Send the email out
+ $mailerInstance->deliverEmail();
}
/**