Automator_Input_Parser::reset_password_url_token( $user_id )


Parameters Parameters

$user_id

(Required)


Top ↑

Return Return

(bool|string)


Source Source

File: src/core/lib/utilities/class-automator-input-parser.php

	public function reset_password_url_token( $user_id ) {

		$user = get_user_by( 'ID', $user_id );
		if ( $user ) {
			$adt_rp_key = get_password_reset_key( $user );
			$user_login = $user->user_login;
			$rp_link    = network_site_url( "wp-login.php?action=rp&key=$adt_rp_key&login=" . rawurlencode( $user_login ), 'login' );
		} else {
			$rp_link = '';
		}

		return $rp_link;

	}