]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/commands/web/class_WebResendLinkCommand.php
A lot debug messages removed, mailer with stubs added, resend link basicly finished...
[shipsimu.git] / inc / classes / main / commands / web / class_WebResendLinkCommand.php
index ba9f9f571692c1a13dcb81602de6b065007dc6f1..887712e75f078900c01dde9d9d40cc04ae86746d 100644 (file)
@@ -44,8 +44,8 @@ class WebResendLinkCommand extends BaseCommand implements Commandable {
        /**
         * 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
@@ -61,12 +61,28 @@ class WebResendLinkCommand extends BaseCommand implements Commandable {
        /**
         * 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();
        }
 
        /**