WordPress password reset manipulate.

Marc Wag­ner

Sep­tem­ber 25, 2020

1 min read|

You can replace or remo­ve the auto­ma­tic pass­word gene­ra­ted by Word­Press at any time by adding the fol­lo­wing small code to the “functions.php” of your child the­me.

image 4
Befo­re the chan­ge.
image 3
After the chan­ge.
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 cour­se adapt to your wis­hes. It is only important that you enter the text domain of your child the­me for ‘twen­ty­six­teen’, so that you can still use the trans­la­ti­ons in the backend of your Word­Press site.

Was this artic­le hel­pful? Then lea­ve us a short com­ment. We are hap­py about your feed­back.

88e86fcb816eff22bc917094df2862d8dd5c0e978b333e6dd5f36f808990c261 96

Arti­kel von:

Marc Wag­ner

Hi Marc here. I’m the foun­der of Forge12 Inter­ac­ti­ve and have been pas­sio­na­te about buil­ding web­sites, online stores, appli­ca­ti­ons and SaaS solu­ti­ons for busi­nesses for over 20 years. Befo­re foun­ding the com­pa­ny, I alre­a­dy work­ed in publicly lis­ted com­pa­nies and acqui­red all kinds of know­ledge. Now I want to pass this know­ledge on to my cus­to­mers.

Hast du eine Fra­ge? Hin­ter­lass bit­te einen Kom­men­tar