WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 23 months ago

Last modified 23 months ago

#12461 closed feature request (duplicate)

Resend Pass to users from "admin > users"-list

Reported by: F J Kaiser Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.2
Component: Users Keywords:
Focuses: Cc:

Description

In some of my projects i got the case, that i have to resend the password to some of my users (in this cases WP is used as a CMS). So i needed a possibility to resend (better would be: reset) the pass. Currently i'm stuck with a custom admin-UI on a template-page that contains a list of users (each in a row).

Currently i got the follwing (in a custom list/table of users) for each user at the end of the <tr>-row:

$user_login = isset($_POST['user_login']) ? stripslashes($_POST['user_login']) : '';
echo
'<td id="' . $user->ID . ';user_pass;' . $wpdb->users . '">' .
'<form name="lostpasswordform" id="lostpasswordform" action="' . site_url('wp-login.php?action=lostpassword') . '" method="post" target="_blank">' .
'<input type="text" name="user_login" id="user_login" class="input hide" value="' . $curuser->user_login  . '" size="15" tabindex="10" />' .
'<input type="submit" name="wp-submit" id="" class="small margin-null" value="reset" tabindex="100" />' .
'</form>' .
'</td>';

This makes it possible to resend the wp_mail to ask the user to reset the pass. I'm not the best at php, so i couldn't achieve any sort of bulk managing this, so i set the target to blank.

I hope this function get's into the user-quickmenu. As i stated before: It would be great if you could reset the pass, so the user get's a new pass in an instant.

Change History (5)

comment:1 @F J Kaiser5 years ago

  • Type changed from defect (bug) to feature request

comment:2 @nacin5 years ago

  • Milestone changed from 3.0 to Future Release

Seems like plugin material. I imagine we don't have all of the hooks for this, but we might.

comment:3 @F J Kaiser5 years ago

a) in my ex. above you can delete the <td> and </td>. i needed that for something else and it ahs nothing to do with the form.

b) as simple as it is: no need for a plugin. 2 hooks would be more effort, than simply adding these 5 lines.

c) i think user-management should be as much evolved as possible. nearly everything's related to users and wp really needs to get stronger and (as a starting point) offer the already built in functions to an admin.

comment:4 @iseulde23 months ago

  • Keywords user pass password login wp_mail removed
  • Resolution set to wontfix
  • Status changed from new to closed

You can definitely do this with the hook edit_user_profile_update, validate and compare $_POST['pass1'] and $_POST['pass2'], compare it to the current password and then send it with wp_mail() if everything's ok.
http://codex.wordpress.org/Plugin_API/Action_Reference/edit_user_profile_update

comment:5 @SergeyBiryukov23 months ago

  • Milestone Future Release deleted
  • Resolution changed from wontfix to duplicate

Duplicate of #24633 and #8296.

Note: See TracTickets for help on using tickets.