mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Users: enable admins to send users a reset password link.
Add a feature so Admins can send users a 'password reset' email. This doesn't change the password or force a password change. It only emails the user the password reset link. The feature appears in several places: * A "Send Reset Link" button on user profile screen. * A "Send password reset" option in the user list bulk action dropdown. * A "Send password reset" quick action when hovering over a username in the user list. Props Ipstenu, DrewAPicture, eventualo, wonderboymusic, knutsp, ericlewis, afercia, JoshuaWold, johnbillion, paaljoachim, hedgefield. Fixes #34281. git-svn-id: https://develop.svn.wordpress.org/trunk@50129 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1078,6 +1078,15 @@ function wp_default_scripts( $scripts ) {
|
||||
|
||||
$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 );
|
||||
$scripts->set_translations( 'user-profile' );
|
||||
$user_id = isset( $_GET['user_id'] ) ? (int) $_GET['user_id'] : 0;
|
||||
did_action( 'init' ) && $scripts->localize(
|
||||
'user-profile',
|
||||
'userProfileL10n',
|
||||
array(
|
||||
'user_id' => $user_id,
|
||||
'nonce' => wp_create_nonce( 'reset-password-for-' . $user_id ),
|
||||
)
|
||||
);
|
||||
|
||||
$scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user