Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ public function send_event(): void {
return;
}

// Check if the user has the necessary permissions.
if ( ! current_user_can( 'manage_options' ) ) {
return;
}

$number = filter_input( INPUT_POST, 'number', FILTER_VALIDATE_INT ) ?: 1;

// Set up basic event data for each valid event.
Expand Down Expand Up @@ -114,6 +119,11 @@ public function clear_all_database_options() {
return;
}

// Check if the user has the necessary permissions.
if ( ! current_user_can( 'manage_options' ) ) {
return;
}

global $wpdb;

$query = $wpdb->prepare( "DELETE FROM {$wpdb->prefix}options WHERE `option_name` LIKE 'stellarwp_telemetry%%';" );
Expand Down
Loading