X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fcontroller%2Fhtml%2Flogin%2Fclass_HtmlLoginAreaController.php;h=375bdeeaf5db8aba3ef32d65403fddc488bb4b90;hp=0c7725c0de7e639980c0c09002ad1a1c63458158;hb=9de57a793d0555beb99dfbcbe80503e8e29d69a9;hpb=d8064406dd069aac5c3735ffa37d42fdc199a744 diff --git a/inc/classes/main/controller/html/login/class_HtmlLoginAreaController.php b/inc/classes/main/controller/html/login/class_HtmlLoginAreaController.php index 0c7725c0..375bdeea 100644 --- a/inc/classes/main/controller/html/login/class_HtmlLoginAreaController.php +++ b/inc/classes/main/controller/html/login/class_HtmlLoginAreaController.php @@ -70,35 +70,11 @@ class HtmlLoginAreaController extends BaseController implements Controller { * @return void */ public function handleRequest (Requestable $requestInstance, Responseable $responseInstance) { - // Get the command instance from the resolver by sending a request instance to the resolver - $commandInstance = $this->getResolverInstance()->resolveCommandByRequest($requestInstance); - - // Add more filters by the command - $commandInstance->addExtraFilters($this, $requestInstance); - - // Try to run the pre filters, if auth exceptions come through redirect here - try { - // Run the pre filters - $this->executePreFilters($requestInstance, $responseInstance); - } catch (UserAuthorizationException $e) { - // Redirect to main page - $responseInstance->redirectToConfiguredUrl('login_failed'); - - // Exit here - exit(); - } - - // This request was valid! :-D - $requestInstance->requestIsValid(); - - // Execute the command - $commandInstance->execute($requestInstance, $responseInstance); - - // Run the pre filters - $this->executePostFilters($requestInstance, $responseInstance); - - // Flush the response out - $responseInstance->flushBuffer(); + /* + * Generic execute of the command: pre and post filters with redirect + * but request becomes valid after pre-filters run. + */ + $this->genericHanleRequestLoginAreaFailedRedirect($requestInstance, $responseInstance); } }