Hey guys!
What’s the best way to enforce strong passwords on ACF password field? Do I need to create my own function and apply to the acf/update_value/name=password hook? or is there an option somewhere, I was thinking of using WP function that generates strong passwords. But I could not find it. Could someone show me where WP does that in the code?
Another question. It seem the ACF password field is stored in plain text in the database. If I want to do the same way WP does for storing passwords do I only need use the function wp_hash_password or is there something else?
Thanks in advance for your help!
WP stores passwords as MD5 hashes, yes you can use https://codex.wordpress.org/Function_Reference/wp_hash_password and the explanation of how it works on in the codex.
To validate a field you would use an acf/validate_value filter https://www.advancedcustomfields.com/resources/acf-validate_value/
If you want to know how WP generates a password I would start by searching the core files for function wp_generate_password
https://codex.wordpress.org/Function_Reference/wp_generate_password