Working user supplied password
-
I take no credit for the code – this is what I hacked together to allow a user to set their own password at registration. This code is hacked together from code snippets provided by Eric Martin and found here: https://gist.github.com/slobodan
No warranty, works for me, your mileage may vary :).
In your theme’s functions.php file:
require_once(‘PATH_TO_FILE/rb_registration_form.php’);Then create the file rb_registration_form.php, located in the path you supplied above:
Now, my PHP/JQuery knowledge is beginner at best. If anyone could assist with information on how to pass the user_login value provided, by the user, on the registration form so that the Login Form user_login can be auto populated after successful registration – it would be greatly appreciated.
The current workflow is:
1. User fills and submits registration form
2. Validate form
3. Error, prompt user. Success, forward to login form.I would like for step 3 – Success – to pass the user_login value and populate the user_login field on the Login Form. Just a small usability feature I think would be nice.
Note: The code above does not stop WordPress from generating a password that gets sent with the new user registration email. The WordPress generated password is not used and if the registration email is not altered it will cause confusion. This was not an issue for me as I use the SB Welcome Email Editor plugin and just removed the password field from the registration email.
The topic ‘Working user supplied password’ is closed to new replies.