X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Fcommands%2Fhtml%2Fclass_HtmlResendLinkCommand.php;h=ab8974dbadef3015f546ed38d991f73284f1b6df;hb=5dfec1886bc8db372483aa4f710c948f4fdc8027;hp=cc520f6a38c2afd37dfe7f6709f4fc26ee7875c7;hpb=ab1a6c5d8aeb77b01ce96672accb16e2f7deeb54;p=core.git diff --git a/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php b/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php index cc520f6a..ab8974db 100644 --- a/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php +++ b/framework/main/classes/commands/html/class_HtmlResendLinkCommand.php @@ -1,23 +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 * @@ -71,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 = $this->getResolverInstance()->getApplicationInstance(); + $applicationInstance = ApplicationHelper::getSelfInstance(); // Get a RNG instance (Random Number Generator) $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class'); @@ -89,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');