![]() |
Hi everyone!
I'm studying the CodeIgniter Shield code and noticed that the password hash seems to be done after inserting the user's data into the database. Could someone confirm if this is correct and explain why this approach was chosen?Here is a part of the UserModel and User entity code showing this:UserModel.php UserModel.php PHP Code: protected $afterInsert = ['saveEmailIdentity']; User.php PHP Code: public function saveEmailIdentity(): bool Why is the password hashed after insertion and not before? |
Welcome Guest, Not a member yet? Register Sign In |