retrieve_password

FUNCTION woocommerce\includes\shortcodes\class-wc-shortcode-my-account.php (ligne 233) github
After sending the reset link, don't show the form again. 		  		if ( ! empty( $_GET['reset-link-sent'] ) ) { // WPCS: input var ok, CSRF ok. 			return wc_get_template( 'myaccount/lost-password-confirmation.php' ); Process reset key / login from email confirmation link 			  		} elseif ( ! empty( $_GET['show-reset-form'] ) ) { // WPCS: input var ok, CSRF ok. 			if ( isset( $_COOKIE[ 'wp-resetpass-' . COOKIEHASH ] ) && 0 < strpos( $_COOKIE[ 'wp-resetpass-' . COOKIEHASH ], ':' ) ) {  // @codingStandardsIgnoreLine 				list( $rp_id, $rp_key ) = array_map( 'wc_clean', explode( ':', wp_unslash( $_COOKIE[ 'wp-resetpass-' . COOKIEHASH ] ), 2 ) ); // @codingStandardsIgnoreLine 				$userdata               = get_userdata( absint( $rp_id ) ); 				$rp_login               = $userdata ? $userdata->user_login : ''; 				$user                   = self::check_password_reset_key( $rp_key, $rp_login );  				// Reset key / login is correct, display reset password form with hidden key / login values. 				if ( is_object( $user ) ) { 					return wc_get_template( 						'myaccount/form-reset-password.php', 						array( 							'key'   => $rp_key, 							'login' => $rp_login, 						) 					);

Paramètres

Entrée :
N/A
Sortie :
@return bool True: when finish. False: on error

Utilisation

// Utilisation de la fonction retrieve_password
$result = retrieve_password();

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...