Home › Forums › ACF PRO › Letting users choose their own password on registration › Reply To: Letting users choose their own password on registration
Hi @futaba
Unfortunately, the method you were using (pointing to wp-login.php?action=register
) won’t allow you to have a password field. As a workaround, you can add a password field manually like this:
<input type="password" name="user_password" value="" placeholder="Password" id="user_password" class="input" />
And then use the user_register action and wp_set_password() function to change the password like this:
add_action( 'user_register', 'myplugin_registration_change_pass', 10, 99 );
function myplugin_registration_change_pass( $user_id ) {
if ( isset( $_POST['user_password'] ) )
wp_set_password( $_POST['user_password'], $user_id );
}
Like I said before, this topic is more related to WordPress. For further support, kindly visit WordPress community instead.
I hope this helps 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.