[eluser]razerone[/eluser]
Hi I my call back function is not working have not idea why?
Code:
public function login_validation() {
$this->load->library('form_validation');
$this->form_validation->set_rules('email', 'Email', 'trim|required|callback_validate_credentials|xss_clean');
$this->form_validation->set_rules('password', 'Password', 'required|md5');
if ($this->form_validation->run())
{
redirect('users/members');
}
else
{
$this->load->view('login');
}
}
public function validate_credentials() {
$this->load->model('model_users');
if ($this->model_users->can_log_in()) {
return true;
} else {
$this->form_validation->set_message('validate_credentials', 'Incorrect Username/Password.');
return false;
}
}
I have now found out problem issue it is with HMVC I have found a link that helps if any one has hmvc and has problems will call back
How to make Call back works with HMVC