I've to "override" a module that manage a redirect. The original module have this code:

public function execute()
            $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
            return $resultRedirect->setPath('customer/account/login');

How can i modifiy that result? I'm trying to create a plugin with an after method, but i'm not sure that i can works.


namespace ACME\MODULE\Plugin\Original;

class Login{

    public function afterExecute(\Bla\Bla\Controller\Original\Login $subject, $result){
// What i've to put down here?


  • What do you want to do with your afterExecute ? Redirect or on other link or do some stuff and keep the original redirect ? – Vinz Aug 29 '18 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.