Hash Password in CI4

Password:

1. Created a Helper Function
Created helper functions for password hashing and verification to reuse across your application.

Create a file in app/Helpers, e.g., app/Helpers/password_helper.php

password_helper.php

 

 

2. Hash Password During Registration

 

3. Verify Password During Login

If the password is verified, it will return 1, else blank. e.g. below

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *