CakePHP: Auth Component not logging in

后端 未结 1 634
挽巷
挽巷 2021-01-28 00:22

I\'m studying right now CakePHP, and I followed every direction they gave me there and I got wonderful results, but when it comes to the Auth Component (and the very simple auth

相关标签:
1条回答
  • 2021-01-28 00:50

    You will have to hash the password before saving it into the database. When authenticating using AuthComponent::login(), the password entered in your login form is first hashed and then checked with the entry in the database. As your entry in the database is not hashed, the check returns false.

    Hash the password in User::beforeSave() as mentioned here in the book.

    0 讨论(0)
提交回复
热议问题