CakePHP 4 : edit password (hashed) from old account OK - connect KO


I don’t know if somebody encountered the same problem or if I miss an important thing, but i have the following problem :
I have an almost empty cakephp project connected with an old database and “users” table.

I used the Authentication Plugin : CMS Tutorial - Authentication - 4.x
And Bake for CakePHP.
Nothing more.

I can :

  • Add a new user.
  • Edit an user (all fields, password included)
  • Log me with an user that I have created

I can’t :

  • Log me with an user that I have not created, even if I edit the password from an other account (account that I have created)

In my database the password seems to be hashed like the others after editing, but unable to connect.

The other fields are filled with the same data.

Thanks for your answer.

Not too sure if this is the issue, but the username (email) or id may well be factored into the hash - so therefore 2 users with the exact same password will have different hashes. In which case, changing the id would mean the expected hash will be different.

Thanks for your help.

Hashes is similar (same “base” - first characters) but not identical. I suppose that password is correctly created during editing.
I will try several tests again with my database, maybe that a field used cause a problem.
I dont know all parameters which impact the hashes but i dont understand how can there be difference between an old and a new account.
If editing works properly (but maybe not finally), the other alternative is a problem in my database.
I don’t see another option.