PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.19
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.19
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
← All changes | includes/API/V1/Auth.php +1 -7 1.10.151.10.19 View file →
@@ -446,18 +446,12 @@
446 446 *
447 447 * @return WP_REST_Response
448 448 */
449 449 public function get_all_users_sessions( WP_REST_Request $request ): WP_REST_Response {
450 - global $wpdb;
451 -
452 450 $auth_service = AuthService::instance();
453 451
454 452 // Get all users who have refresh tokens.
455 - $user_ids = $wpdb->get_col(
456 - "SELECT DISTINCT user_id
457 - FROM {$wpdb->usermeta}
458 - WHERE meta_key = '_woocommerce_pos_refresh_tokens'"
459 - );
453 + $user_ids = $auth_service->sessions()->users_with_sessions();
460 454
461 455 $users_data = array();
462 456
463 457 // Get current JTI if available from the request token.