This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Advanced Custom Fields ACF Password field and MD5 Hashing
ACF is great, but there can be some security concerns. Primary among them from front-end posting, is Passwords. If you ever find yourself using the “PASSWORD” ACF field type, make sure you hash it so you’re not storing the password as plain text!
It’s dead simple, drop this bit into functions.php
/* http://biostall.com/hashing-acf-password-type-fields-in-wordpress/ */ function ns_function_encrypt_passwords( $value, $post_id, $field ) { $value = wp_hash_password( $value ); return $value; } add_filter('acf/update_value/type=password', 'ns_function_encrypt_passwords', 10, 3);
About north street
We engineer the thoughtful transformation of great organizations. Our proven process helps us understand what your competitors are doing right — and wrong. Want to learn more? Let’s chat.