In yii, i am creating a project. I want to create link in yii such that it will get send to user by email and when user will click link,actionCheck
will get called in which this user's id will get retrieved. and password reset page will get render to him for inserting new password. I also want to pass confirmation random key generated along with link,So that i can retrieve that user's id, So how to create this link?
i had generated it as-
$url='http://localhost/Project/index.php?r=User/Check&key=$key'
where $key
is a randomly generate one.
When i am passing this link to email and clicking it,Its giving an error as-
"Error 403 You are not authorized to perform this action."
Please help me.
In your User controller you can see
public function accessRules()
{ ... }
add your actionCheck()
there, with appropriate access rules something similar to below
array('allow',
'actions'=>array('action1','action2',..............,'check'),
'users'=>array('*'),
),