Open mrwpress opened 2 years ago
function wo_ap_et_access_token_for_user() { global $wpdb;
$current_user = get_current_user_id(); $check = $wpdb->get_row( "SELECT * FROM {$wpdb->prefix}oauth_access_tokens WHERE user_id ={$current_user}" ); return $check;
}
Needs to be:
$current_user = get_current_user_id(); $query = "SELECT * FROM {$wpdb->prefix}oauth_access_tokens WHERE user_id = %d"; $query = $wpdb->prepare( $query, $current_user ); return $wpdb->get_row( $query );
NOTE: The prepare() method of $wpdb ensures security of the query.
https://developer.wordpress.org/reference/classes/wpdb/prepare/
function wo_ap_et_access_token_for_user() { global $wpdb;
}
Needs to be:
function wo_ap_et_access_token_for_user() { global $wpdb;
}
NOTE: The prepare() method of $wpdb ensures security of the query.
https://developer.wordpress.org/reference/classes/wpdb/prepare/