Yii-User Login

I have the yii-user already… the updated one.

My problem is i do not know how to change my index page into my login page.

Note: IN yii-user login page which under the module.

Site Controller code:

public $defaultAction = 'Login';

public function actionLogin()


		if (Yii::app()->user->isGuest) {

			$model=new UserLogin;

			// collect user input data




				// validate user input and redirect to previous page if valid

				if($model->validate()) {


					if (Yii::app()->getBaseUrl()."/index.php" === Yii::app()->user->returnUrl)






			// display the login form


		} else



And the browser display this error: SiteController cannot find the requested view "/user/login".

Thanks… :unsure:

Here your view file(login form ) is render form the file user/login.php (Means user folder and login.php file)


so please ensure '/user/login.php exist.

Note: Most of the time controllerName/file.php is used to render the view

the view file is under user/views/user/login

thats the problem

u may simply copy the login.php to the views/site

and use like