Problem of logout after redirect


My problem is as follow.

I’m getting inconsistente respond from the redirection function ($this->redirect…).

Failed: my user is loggedin after the registration but gets loggedout after the redirection

Passed: when I do an "autologin" in other scenario (change password), the redirection does not logout my user.

Here is my autologin function

private function _autoLogin($username, $password)


            $model=new LoginForm;

            $model->password = $password;

            $model->username = $username;

            if($model->validate() && $model->login())





Have you an idea why?

Edit: I made another test, and it’s not only from the redirection.

I removed the redirection, and when I clicked on a link on the page I was loggedout again

I’m having similar issue.

After logging in, it doesn’t save the information.

Any ideas?

I’m not sure if this will help you but I had similar problem and all I had to do was comment out the folowing code in my protected/config/main.php

 'session' => array(

            'sessionName' => 'Site Session',

            'class' => 'CHttpSession',

            'autoStart' => 'true',


Not sure why this worked and not sure if this is your problem, but figured I’d share.

Good Luck