PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Creating Custom Password Reset Form

  1. I guess I have a strange request, but I know there has to be a way. I have set up a custom registration form that handles Name, Email, Practice (medical), Phone and Password. All this is stored somewhere in the back-end, I just don't know where. Here is what I need to do:

    Taking advantage of gravity forms and the wp-login.php files, I would like to find out where the custom userdata of gravity forms is stored, call those functions into the wp-login.php file where when a user requests to reset their password, all the custom Gravity Form info user data is sent to the admin of the site in a wordpress-generated email:

    [php]
    $message = __('Someone requested that the password be reset for the following account:') . "\r\n\r\n";
    	$message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n";
    	$message .= sprintf(__('User Email: %s'), $user_email) . "\r\n\r\n";
    	$message .= __('If this was a mistake, just ignore this email and nothing will happen.') . "\r\n\r\n";
    	$message .= __('To reset your password, visit the following address:') . "\r\n\r\n";
    	$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login') . ">\r\n";

    So the admin gets Name, Email, Practice, and Phone and the new password of the user requesting the reset. Right now I just have username and email.

    Secondly, I want to learn how to use custom queries to auto-populate the Phone and Practice fields in the contact form (as I don't know how to), separate from registration form, so when a logged in user wishes to contact site admin, their fields are already populated for them according to the info they inputted when they registered. I realize this is a common question on these forums, but I still don't understand what needs to be done code-wise...

    So yeh, mainly I just want to know where I need to go to access the stored info gravity forms keeps of registered user data, then I need to call that data to be sent through email to the admin when a user resets their password. My client (the admin) wants to have all that information. And lastly, need to know how to create a query for auto populating fields: Phone and Practice.

    Thanks! Hope that makes sense.
    Josh

    Posted 13 years ago on Wednesday October 19, 2011 | Permalink