I’m assuming that the meta_value has a serialized array, not the meta_key (For it would make no sense to have the meta_key to be a serialized array)
You really should save the values in seperate fields to be able to query it by wordpress internal functions like get_users.
If you definitely have to preserve this data-structure, you have to go by directly accessing the Database by wpdb like this:
global $wpdb;
$claimed_user_ids = $wpdb->get_col($wpdb->prepare("SELECT DISTINCT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value LIKE %s",'<META_KEY>','%username%'));
(replace with the meta_key which holds the serialized array).
Happy Coding, Kuchenundkakao
Related Posts:
- If Array Values Match Another Array’s Values, Then
- Comapare get_user_meta value
- How can get all users by current user meta?
- Store custom field’s multiple values in one user meta key
- How can get all users by current user meta (array)?
- Filtering a function’ output for a new continued function
- Get html data with javascript to php array and store to wordpress database
- How do I create a numbered list with PHP? [closed]
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- Countdown to date function?
- How to use array in function to get only value I want
- Error while setting role
- Get categories names as an array to use it in theme settings
- How to get the last category name of a child category?
- How to say if meta_value is greater than 0 in an array?
- Getting users with a specific meta data and then querying their posts?
- How to use two meta_compare in an array?
- How to update and save user metadata on page visits?
- Warning: in_array() null given in PHP function
- Foreach loop inside an array_merge
- Login redirect. Check user meta and redirect accordingly
- Loop over Array and get the distinct ids
- How to access or parse key/values that have “string”
- User Meta Value not echoing despite Var_Dump Showing correct string
- Remove empty terms from array, sort alphabetically, update back to repeating field
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Only show first image in foreach loop
- Shortcode for Listing Users from Meta Value?
- Conditional multidimensional arrays and array_map
- Getting different user data depending on where I use variable
- How can I get all values from my array in a loop in php? [closed]
- Getting posts to exclude from array
- Get all posts as an array ID => Name
- Adding Author Box Meta Links with Co-Authors
- I’m unable to call img path using single quotes in an array?
- Filter by field with array value in ACF on WP REST API
- Get the users that my following users are following
- extract serialized array to use for wp-query
- get users search not working with array
- Get the id of all images in a post
- Output category list inside array
- how to make an array of post id’s in is_single
- How can I split my query result in 2 arrays?
- Multidimensional Array
- Separate array output into a
- array_rand not working correctly?
- Get css class of menu item in custom menu structure
- Dynamically adding filters
- Order a WP_Query by meta value where the value is an array
- Edit Account – read and write to MySQL
- Only load certain artists on this page
- add the value of a variable returned in a while loop [closed]
- Update value of a associative array with update_post_meta
- How to make sure relative URL works when site is not on root domain?
- Get URI from PodPress using PHP
- How To Pass Array To get_the_category_by_ID() and Get An Array Back?
- using images in next/previous_post_link [closed]
- Finding and removing duplicates within WP Arrays
- Using multiple variables to assign categories to an array
- Uses for function: wp_update_user
- Custom functions for string data calculations
- Add custom fields from different posts
- Update user repeater meta (ACF) with another user meta field value
- Create condition for Author bio Social Links
- Repeat a function with 24hrs gap for n number of days
- MySQL Query Returns Array () In Shortcode
- How to store checkbox data for individual users?
- Problem with inserting multiple images in gallery of each WooCommerce product programmatically
- Convert a column of a table containing an Array as response in HTML
- How do I Populate a Table Field with User Meta Data?
- Sending simple variable on single page to WP JSON
- Create an array with all the links of the years’ archive (of a custom post type)
- Display just one post from a loop of 5 posts?
- Order users by random not working?
- Redux option doensn’t seem when include from functions.php
- How to add and subtract user meta values after post meta update
- in_array not working on dev server but works on localhost
- User meta needed in query is serialized – how to unserialize safely?
- Include User ID in iFrame URL
- WP custom posts: filter results to custom taxonomy tag that corresponds to user meta field
- Usermeta data unserialize, extract and display in table in WordPress
- How can I show how much water got saved on this order (making use of the number of items bought) on a thank-you-page?
- how to separate an array into different arrays and save them into db?
- Change user metadata on registration (show_admin_bar_front = false)
- How to insert multiple rows and columns in database using array
- Display one random image from Media Library
- How to display MySQL table data which is stored as an array?
- Store data from JavaScript object to custom table in user account
- ACF – Get ID of relationship field in flexible content
- Export WordPress User Meta to CSV/Excel
- Updating User Profile information removes image
- Replace an array (with identical values) with another array in the_content
- How to change the value of a variable using input field?
- Display current user metadata on WordPress page
- Show the subcategory name based on current product
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Get user by meta data key and velue
- How to filter specific element of an array in wordpress/php?
- Where do I implement this display of User Meta Data, and how to put it in a table?
- WP post meta – for loop inside for loop