Zoom_Webinar_Helpers::disconnect()

Disconnect the user from the Zoom API.

Contents


Return Return

(Uncanny_Automatorvoid.)


Source Source

File: src/integrations/zoom-webinar/helpers/zoom-webinar-helpers.php

	public function disconnect() {

		if ( wp_verify_nonce( filter_input( INPUT_GET, 'nonce', FILTER_DEFAULT ), 'uap_automator_zoom_webinar_api_disconnect' ) ) {

			delete_option( 'uap_automator_zoom_webinar_api_consumer_key' );
			delete_option( 'uap_automator_zoom_webinar_api_consumer_secret' );

			delete_option( '_uncannyowl_zoom_webinar_settings_version' );
			delete_option( '_uncannyowl_zoom_webinar_settings' );

			delete_transient( '_uncannyowl_zoom_webinar_settings' );
			delete_transient( 'uap_automator_zoom_webinar_api_user_info' );

		}

		$return_uri = add_query_arg(
			array(
				'post_type' => 'uo-recipe',
				'page'      => 'uncanny-automator-settings',
				'tab'       => 'zoom_webinar_api',
			),
			admin_url( 'edit.php' )
		);

		wp_safe_redirect( $return_uri );

		exit;

	}