Use password_hash and verify |
I am trying to create a register function using password_hash(), and I try to use password_verify for my login function. Currently my register function works well, my password is hashed in my phpmyadmin database but my error comes from my login function. I have a verify_user in my controller
Code: function verify_user(){ Code: $user_details = $this->login_model->verify_user($email,$password); Code: function verify_user($email,$password)
PHP Code: // model
Read this article first.
Implementing Secure User Authentication in PHP Applications with Long-Term Persistence (Login with "Remember Me" Cookies) The best example that I have seen is how Myth/Auth does it, it uses the above type coding. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |