How To Redirect To Update Page When Clicked On A Menu Item

I’m new to Yii framework. I have a user table which has username and password. I’m using the update page of user to reset password. Now, when I login with username and password I get a menu item as “password-reset” . When I click on this I like to get the update page of user who has logged in.

Below is the code in main.php:


array('label'=>'Password-Reset', 'url'=>array('groupzSupport/update'),'visible'=>(!Yii::app()->user->isGuest && Yii::app()->user->name=="admin")),

But , when I click this I get


error 404

.

When logged in as test I should get the update page of test when I click "Password-Reset" menu item.

How can I do this.

is your function actionUpdate exists in your protected/controller/groupzSupportController (check spelling) ? If yes your error comes from this function, if no then you have to create this action cause your link goes nowhere. Moreover, don’t forget to put this action in your accessrules.

I think,you should a id while calling update,Check if your update method needed parameter of id,than please pass it,while calling it.following way:-

‘url’=>array(‘groupzSupport/update’,‘id’=>‘your id’)