LLMS_Controller_Certificates::maybe_authenticate_export_generation()

Utilizes a nonce to display a certificate cURL request is used to scrape the HTML and this will authenticate the scrape


Description Description


Return Return

(void)


Top ↑

Source Source

File: includes/controllers/class.llms.controller.certificates.php

	public function maybe_authenticate_export_generation() {

		if ( empty( $_REQUEST['_llms_cert_auth'] ) ) {
			return;
		}

		$post_id = get_the_ID();
		if ( ! in_array( get_post_type( $post_id ), array( 'llms_my_certificate', 'llms_certificate' ) ) ) {
			return;
		}

		if ( get_post_meta( $post_id, '_llms_auth_nonce', true ) !== $_REQUEST['_llms_cert_auth'] ) {
			return;
		}

		$cert = new LLMS_User_Certificate( $post_id );
		wp_set_current_user( $cert->get_user_id() );

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.18.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.