Another login form

Hi…

I just made a controller with couple of methods that should be accessed only by special users. I wrote the accessRules like ('allow','myMethod','@') and that works, but redirects users to site/login, though I'd like to use myController/login which displays different login form (no username, just password).

Any help how to accomplish that?

You can change the login form by modifying app config as:



return array(


    'components'=>array(


          'user'=>array(


                'loginUrl'=>array('myController/login'),


          ),


    ),


);


This can also be modified dynamically in your code using

Yii::app()->user->loginUrl=array('myController/login');

ok then… now I'm curious where should I put that one (Yii::app()->user->loginUrl=array('myController/login')

I would like to use myController/login only in that particular controller.

In the controller's init() method.

walking wiki you are, thank you :D