Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatcher forward doesn't work from initialize in Controller (1.2.3) #1431

Closed
alpaxo opened this issue Oct 24, 2013 · 2 comments
Closed

Dispatcher forward doesn't work from initialize in Controller (1.2.3) #1431

alpaxo opened this issue Oct 24, 2013 · 2 comments

Comments

@alpaxo
Copy link

alpaxo commented Oct 24, 2013

In my controller i have

    public function initialize(){
        $this->userId = $this->session->get('user')->id;
        if(!$this->userId){
            return $this->dispatcher->forward(array(
                'controller' => 'account',
                'action' => 'login'
            ));

        }
        $this->view->setVars(array(
            'user' => $this->user = User::findFirst('id='.$this->userId)
        ));
    }

but the actual forwarding doesn't occur

In 1.3.0 that code works as expected

@phalcon
Copy link
Collaborator

phalcon commented Oct 24, 2013

We don't fix bugs in old releases. Could you try to use 1.3.0?

@phalcon phalcon closed this as completed Oct 25, 2013
@ghost
Copy link

ghost commented Oct 26, 2013

@alpaxo does it work in 1.2.4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant