Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8970095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:41:04+00:00 2026-06-15T17:41:04+00:00

My loginAction is in a module user , in the controller application/modules/user/controllers/AuthController.php . I

  • 0

My loginAction is in a module user, in the controller application/modules/user/controllers/AuthController.php. I want to redirect upon successful login to the indexAction in application/controllers/IndexController.php. So I have this:

if ($result->isValid()) {
            $auth->getStorage()->write($adapter->getResultRowObject());

            $this->_helper->redirector('index', 'index');

            return;
}

When I now login, I get the message Message: Invalid controller specified (index). I guess it is because my login is in the module user, while the IndexController is in the root application.

How can I fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:41:05+00:00Added an answer on June 15, 2026 at 5:41 pm

    The redirector() action helper has several methods to redirect the request.

    try this, the controllers at application/controllers are in the ‘default’ module:

    if ($result->isValid()) {
        $auth->getStorage()->write($adapter->getResultRowObject());
        //redirector($action, $controller, $module)
        $this->_helper->redirector('index', 'index', 'default');
    }
    

    The way I prefer to use this helper is more explicit, so I don’t have to remember the defaults:

     if ($result->isValid()) {
            $auth->getStorage()->write($adapter->getResultRowObject());
            //gotoSimple($action, $controller, $module, $params = array())
            $this->getHelper(redirector)->gotoSimple('index', 'index', 'default');
            //or use gotoUrl($url)
            $this->getHelper(redirector)->gotoUrl('/index/index');
            //or use gotoRoute()
            $this->getHelper(redirector)->gotoRoute('action'=>'index', 'controller'=>'index', 'module' => 'default');
        }
    

    and the quick and dirty utility method:

     if ($result->isValid()) {
            $auth->getStorage()->write($adapter->getResultRowObject());
            //_redirect($url);
            $this->_redirect('/index/index');
        }
    

    Hope this helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If a logged in user goes to the login action, I want to redirect
i have a controller name UserController in application/controllers the base folder is zend-login and
I want to test the login() action in my UsersController.php <?php class UsersController extends
<action name=doLogin class=controller.LoginAction> <result name=input>login.jsp</result> <result name=error>login.jsp</result> <result name=success type=redirectAction> <param name=actionName>doStartIndex</param> </result> <result
In my IndexController, I currently have indexAction (homepage), loginAction and logoutAction. I'm trying to
I am using a login form on Symfony2 with the following controller code public
currently, to login a user in Zend Framework, i do something like public function
I'm using ACL and Auth in my application. If a logged-out user loads an
Is there a way to communicate between Zend Modules as stated below? I want
I am having trouble getting the Auth component redirect. I have a login form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.