0
I’m creating a role in controller UsersController
, this function is for users who forget the password. When I try to open the view
, returns an error that the function does not exist.
The structure is like this:
- view
esqueci_senha.ctp
- function
function esqueciSenha()
To open the view I do so:
<a href="<?php echo $this->Html->url("/Users/esqueci_senha")?>"><i class="glyphicon glyphicon-question-sign"></i> Esqueci minha senha</a>`
The mistake:
Error: The action forgetting password is not defined in controller Userscontroller
Error: Create Userscontroller::forgetful_password() in file: app Controller Userscontroller.php.
class Userscontroller extends Appcontroller {
public Function forgetting password() {
}
}
How to solve?
i had already done this, I changed the name of the function as you are suggesting and tbm the name of the view, but when I click on the link to open simply does not open, reload the page and does not open.
– FernandoPaiva
And with the URL
/Users/esqueciSenha
?– bfavaretto
Woe gives the following error:
Error: The view for UsersController::esqueciSenha() was not found.
– FernandoPaiva
I managed to solve, the function has to be called
esqueciSenha
and the viewesqueci_senha
, I did that and it worked. Thank you.– FernandoPaiva
But that’s what you said you had and it didn’t work!
– bfavaretto
no, look at the post that in the url I invoked the view
esqueci_senha
and now I switched to invoke the functionesqueciSenha
, I think by default the cake uses the underline for the view when the function eh camelcase.– FernandoPaiva