Commit 6f7cceb4 authored by Eric Windham's avatar Eric Windham

added auth checks to connect and disconnect functions

parent 71d5dfdb
Pipeline #3630 passed with stages
in 1 minute and 11 seconds
......@@ -74,6 +74,10 @@ class OAuth
}
public function connect() {
// Does the current user have admin privileges
if (!current_user_can('manage_options')) {
return;
}
// wp_verify_nonce( $_REQUEST['nonce'], 'nf-oauth-connect' );
......@@ -95,6 +99,11 @@ class OAuth
public function disconnect() {
// Does the current user have admin privileges
if (!current_user_can('manage_options')) {
return;
}
do_action( 'ninja_forms_oauth_disconnect' );
$url = trailingslashit( $this->base_url ) . 'disconnect';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment