X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fcommands%2Fhtml%2Fclass_HtmlResendLinkCommand.php;h=b09a3b4f219d41d6593e33096fda5c18a8e8638a;hb=79e6029823f993ec7503a399aa2fdbb95aadb2d1;hp=d19d9c24f9b93e014931e42b27db80976e690316;hpb=146c8b3c929a1b0ab17d6605e5ae949ac44899c1;p=core.git diff --git a/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php b/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php index d19d9c24..b09a3b4f 100644 --- a/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php +++ b/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php @@ -1,24 +1,26 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2020 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -72,10 +74,10 @@ class HtmlResendLinkCommand extends BaseCommand implements Commandable { */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { // Get user instance from registry - $userInstance = Registry::getRegistry()->getInstance('user'); + $userInstance = GenericRegistry::getRegistry()->getInstance('user'); // Get an application instance - $applicationInstance = Registry::getRegistry()->getInstance('app'); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Get a RNG instance (Random Number Generator) $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class'); @@ -90,22 +92,19 @@ class HtmlResendLinkCommand extends BaseCommand implements Commandable { $hashedString = $cryptoInstance->hashString($cryptoInstance->encryptString($randomString)); // Update the user class - $userInstance->updateDatabaseField(UserDatabaseWrapper::DB_COLUMN_CONFIRM_HASH, $hashedString); + $userInstance->updateDatabaseField(UserDatabaseFrontend::DB_COLUMN_CONFIRM_HASH, $hashedString); // Re-set config entry to mailer engine - $this->getConfigInstance()->setConfigEntry('html_template_class', $this->getConfigInstance()->getConfigEntry('mail_template_class')); - - // Prepare the template engine - $templateInstance = $this->prepareTemplateInstance($applicationInstance); + FrameworkBootstrap::getConfigurationInstance()->setConfigEntry('html_template_class', FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('mail_template_class')); // Assign the application data with the template engine - $templateInstance->assignApplicationData($applicationInstance); + $this->getTemplateInstance()->assignApplicationData(); // Get a mailer class - $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class', array($templateInstance, $applicationInstance, 'resend_link')); + $mailerInstance = ObjectFactory::createObjectByConfiguredName('mailer_class', array($this->getTemplateInstance(), 'resend_link')); // Set this mailer in our template engine - $templateInstance->setMailerInstance($mailerInstance); + $this->getTemplateInstance()->setMailerInstance($mailerInstance); // Add template variables we shall get $mailerInstance->addConfigTemplateVariable('base_url');