check password with form_vaidation seems not working

#1
[eluser]Bloupies[/eluser]
Hi,

This is my check pass function :

Code:
public function check_pass($login, $pass)
{
  if($this->exist($login)) {
  
   $resultRequete = $this->CI->db->get_where('t_utilisateur_uti', array('uti_login' => $login))
            ->result();
            
   if($resultRequete[0]->UTI_PASS == sha1($pass)) return true;
   else return false;
  }
              
}


My rules :

Code:
$this->form_validation->set_message('exist', 'Le login n\'existe pas.'); /* Si cela retourne false, on met le message */  
  $this->form_validation->set_rules('login', "Nom d'utilisateur", 'trim|required|min_length[5]|max_length[52]|alpha_dash|encode_php_tags|xss_clean|exist[login]');
  
  $this->form_validation->set_message('check_pass', 'Le mot de passe n\'est pas correct.'); /* Si cela retourne false, on met le message */
  $this->form_validation->set_rules('pass', "Mot de passe", 'trim|required|min_length[5]|max_length[52]|alpha_dash|encode_php_tags|xss_clean|check_pass[login, pass]');


And it doesn't works ..

Someone can tell me where the problem is ?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.