Hello,
I am trying to implement “Forgot Password” feature for my website but I am facing with a problem. Normally, I’ve implemented all of the forms as a CJuiDialog widget. Therefore I want to implement the “Reset Password” form as a CJuiDialog widget too. When the user clicks “Forgot Password” link, a form dialog containing e-mail field gets opened. When the user enters his/her e-mail address and submits the form, a link to reset his/her password is sent to the e-mail address. So far so good. The problem stems from this point on. I want that when the user clicks the link, my website will be rendered with the “Reset Password” form CJuiDialog widget opened but I could not achieve it.
The link sent to e-mail address is like:
"mywebsite.com/index.php?r=site/resetPassword&tok=XXXXXXXXXXX"
When the user clicks this link at the mail, actionResetPassword() function of SiteController is called.
My experiences are as below:
- When I render the view file in actionResetPassword() as:
$this->render(‘resetPassword’,array(‘model’=>$model), false);
and the ‘autoOpen’ is ‘false’ for the CJuiDialog of the view file, the web site is opened but “Reset Password” form dialog is not opened.
- When I render the view file in actionResetPassword() as:
$this->render(‘resetPassword’,array(‘model’=>$model), false);
and the ‘autoOpen’ is ‘true’ for the CJuiDialog of the view file, the web site is opened but an empty form dialog is opened.
- When I render the view file in actionResetPassword() as:
$this->renderPartial(‘resetPassword’,array(‘model’=>$model), false, $processOutput);
and the ‘autoOpen’ is ‘false’ for the CJuiDialog of the view file, neither the web site (as expected) nor the form dialog is opened.
- When I render the view file in actionResetPassword() as:
$this->renderPartial(‘resetPassword’,array(‘model’=>$model), false, $processOutput);
and the ‘autoOpen’ is ‘true’ for the CJuiDialog of the view file, the web site (as expected) is not opened, the form dialog is opened. But the form dialog not working normally, for example the validation rules are not working.
Again what I am trying to implement is when the user clicks the link, the website with a form dialog will be displayed and he/she can reset the password via the "Reset Password" form CJuiDialog. How can I achieve the feature in this way?