Redirect doesn't work after extends CWebUser

Hi, i have a problem with login form. After i extends CWebUser and using it, the login form won’t redirect. this is my code:

// components/WebUser.php

class WebUser extends CWebUser


    protected function afterLogin($fromCookie) {



            "hello, after Login event\n".date('Y-m-d H:i:s'));



// config/main.php



    'class' => 'WebUser',




// SiteController.php

public function actionLogin() {

    $model=new LoginForm;

    if(isset($_POST['LoginForm'])) {

        $model->attributes = $_POST['LoginForm'];

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





sorry for my bad english :). thanks

Would not it be called like this for the url:


are you sure this

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

evaluates to true?

yes, of course. i just copy it from yii demo :D. when not using my own WebUser, it’s no problem