Advanced Custom Fields ACF Password field and MD5 Hashing

By North Street, A Creative Studio

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

/* */
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.

More Notes

Photo of Tom Conlon

CEO Tom Conlon in Conversation with Chris White

Designing for Interaction: How Animated Prototypes Revolutionize Website Development

man with arms folded in front of blue city background

Team Spotlight: Cristian Sánchez, Lead Developer