Login solution |
[eluser]Alix.G[/eluser]
Hi, I'm creating a simple user login form using codeigniter validation form class. Here is my form: Code: <?php echo validation_errors('<p class="error">', '</p>'); ?> And here is my controller Code: function validate_login() The associated model: Code: function login() Now here is my problem, I would like to know what would be the best way to have a callback when username/password verification failed. Thank you
[eluser]Unknown[/eluser]
I would say that you need to create a custom callback to do the username validation. http://ellislab.com/codeigniter/user-gui...#callbacks
[eluser]jeffpeck[/eluser]
Code: $this->form_validation->set_rules('au_username', 'username', 'trim|reuired'); That should be "required"... not "reuired". Codeigniter does not seem to give errors if it cannot find the function, so that should save you some trouble.
|
Welcome Guest, Not a member yet? Register Sign In |