Question

I want to make a login system, with the 'forgot password?' , this is the only example that i found..forgotten-password

but i have a problem with my auth permission... i put the link 'forgot password?' in my view login.ctp when I click on the link not allow me to redirect to /user/forgot.ctp and send me a message from my function beforeFilter() on file app_controller.php

this is my link in the login.ctp

 <?php echo $html->link('¿forgot password?', array('controller' => 'users', 'action' =>
 'forgot')); ?></p> 

when I login it works, but when I'm not logged in doesnt work and send me the message error which could be the problem?

Was it helpful?

Solution

I haven't taken a look at the tutorial, but have you tried the beforefilter method in users_controller?

function beforeFilter() {
    parent::beforeFilter();
    $this->Auth->allow('forgot');
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top