⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Can not login after change password using encryption callbacks.



shyan
  • profile picture
  • Member

Posted 23 December 2020 - 11:08 AM

I have changed the password using  grocerycrud  encryption callbacks but when i tried to login with same password it says wrong password. please tell me how use encryption in login model.

 

this is my login model.

 

function check_user($username, $password) {
$this->db->select('*'); //select all
$this->db->from('users'); // table name
$this->db->where('username', $username); // where username is equal to $username
 
            
$this->db->where('password', sha1($password)); // and password is equal to  $password 
$query = $this->db->get(); //get data from DB
return $query;
}