WordPress password reset manipulate.

You can replace or remove the automatic password generated by WordPress at any time by adding the following small code to the “functions.php” of your child theme.

image 4
Before the change.
image 3
After the change.
function removeRandomPassword( $password ) {
	$action = isset( $_GET['action'] ) ? $_GET['action'] : '';
	if ( 'wp-login.php' === $GLOBALS['pagenow'] && ( 'rp' == $action || 'resetpass' == $action ) ) {
		return __('Password...', 'twentysixteen');
	}
	return $password;
}

add_filter( 'random_password', 'removeRandomPassword', 15 );

Note: __(‘Password…’,’twentysixteen’) you can of course adapt to your wishes. It is only important that you enter the text domain of your child theme for ‘twentysixteen’, so that you can still use the translations in the backend of your WordPress site.

Was this article helpful? Then leave us a short comment. We are happy about your feedback.

Hier klicken, um den Beitrag zu bewerten
[Gesamt: 0 Durchschnitt: 0]

Leave A Comment

Title