Reply To: Passwort forgotten form?

Home Forums Quform WordPress Passwort forgotten form? Reply To: Passwort forgotten form?

#32713
MGmeiner
Participant

Oky i got it also ->


add_action('quform_pre_display_6', function (Quform_Form $form) {
    
	if ( !function_exists( 'check_password_reset_key' ) ) { 
			require_once ABSPATH . WPINC . '/user.php'; 
		} 

		// Hash to validate sending user's password. 
		$key = $_REQUEST['key']; 

		// The user login. 
		$login = $_REQUEST['login']; 
			
		$user = check_password_reset_key($key, $login); 
		
		 if ( ! $user || is_wp_error( $user ) ) {
            if ( $user && $user->get_error_code() === 'expired_key' ) {
                wp_redirect( home_url( 'expiredkey' ) );
            } else {
                wp_redirect( home_url( 'invalidkey' ) );
            }
            exit;
        }
});
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy