Skip to content
Snippets Groups Projects
Commit 4ca06509 authored by Erick Hitter's avatar Erick Hitter
Browse files

PHPCS

parent 89868da3
No related branches found
No related tags found
1 merge request!7On activation and deactivation, clean up tokens in previous storage
Pipeline #5055 passed with stages
in 2 minutes and 31 seconds
......@@ -65,15 +65,22 @@ final class Activation_Deactivation_Hooks {
$key = 'session_tokens';
$count = $wpdb->get_var(
"SELECT COUNT(*) FROM $wpdb->usermeta WHERE meta_key = '$key'"
$wpdb->prepare(
"SELECT COUNT(*) FROM $wpdb->usermeta WHERE meta_key = %s",
$key
)
);
if ( ! $count ) {
wp_clear_scheduled_hook( $this->cron_hook );
return;
}
$wpdb->query(
"DELETE FROM $wpdb->usermeta WHERE meta_key = '$key' LIMIT 500"
$wpdb->prepare(
"DELETE FROM $wpdb->usermeta WHERE meta_key = %s LIMIT 500",
$key
)
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment