Yii redirect user / login
2 answers
In protected/config/main.php
where you define parameters for all other system components, you must define loginUrl
for the component user
:
....
'components' => array(
'user' => array (
'loginUrl' => array('/user/login'),
),
....
),
....
Docs: http://www.yiiframework.com/doc/api/1.1/CWebUser#loginUrl-detail
+2
source to share