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)?
- Sorting list of sites from multisite network using wp_get_sites
- How to store the_title() into a variable to reutrn the value, not just echo it
- How to update single value in multi dimensional Post Meta?
- Looping through WP_Post Object
- Using a javascript file to access a get posts array
- Generate an array of parent/child page IDs, based on parent page name
- How do I output a database option that is an array into a get_posts array?
- How do I dynamically generate args for wp_query?
- Parsing php string in jquery [closed]
- Working with query_posts ( arrays and query strings)
- How do I display a user’s previous orders as a select box option on a product?
- How to properly loop through these external URLs to get them into the sitemap using this hook
- Recent posts with featured image or fallback image with permalink
- Call global variable array() in woocommerce child/template
- Storing Array from returned database query and using the array in a new query
- How to use an associative array in post__in with WP_Query?
- Populate dropdown with Child Pages based on Parent Page chosen
- function to assign user role based on a field from usermeta
- How can I save unique user data on my site? [closed]
- PHP Array Returning [object Object]. Tried existing answers results with no luck
- Exclude posts based on meta value
- Alter required message using comment form api
- a:0:{} is replaced into database as s:6:”a:0:{}”;
- Advanced Custom Fields – display label and value only if value entered
- wp_force_remove_style’ not found
- How can I access string value in an array?
- How to use if statement in an array? [closed]
- How to array only one key from another array
- Filtering a function’ output for a new continued function
- 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?
- 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 update and save user metadata on page visits?
- Foreach loop inside an array_merge
- User Meta Value not echoing despite Var_Dump Showing correct string
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Getting different user data depending on where I use variable
- Getting posts to exclude from array
- I’m unable to call img path using single quotes in an 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
- array_rand not working correctly?
- Get css class of menu item in custom menu structure
- Dynamically adding filters
- Edit Account – read and write to MySQL
- How To Pass Array To get_the_category_by_ID() and Get An Array Back?
- Add custom fields from different posts
- Sending simple variable on single page to WP JSON
- Order users by random not working?
- in_array not working on dev server but works on localhost
- Include User ID in iFrame URL
- 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 display MySQL table data which is stored as an array?
- Store data from JavaScript object to custom table in user account
- Updating User Profile information removes image
- How to change the value of a variable using input field?
- Show the subcategory name based on current product
- 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?
- Notice : Array to string conversion on array_intersect user meta
- Get field in readable word
- Remove item from post_meta array via AJAX
- Make sticky post with FacetWP
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- PHP array to jQuery array ” Uncaught SyntaxError: Unexpected token < "
- Adding user meta to post meta wp_insert_post() not working
- Get meta_query value by user meta array
- Display posts using post ID’s in an array
- How can i iterate through this shortcode array?
- Display a single row from nested array of custom field data
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Updating custom user meta
- Updating meta_value in a custom key
- Reformat data within a nested array
- How to find the function which is outputting Array
- Create Customization Controls from Array
- Limit the number of successful logins
- Non-array argument in array_merge()-function [closed]
- Get author meta of all writers
- Let users register weight each day and save it in DB
- !in_array doesnt recognize category
- Showing all post from all post type in admin backstage
- How to set if meta_value is lower < than other meta_value in a get_posts array?
- Populate checkboxes from array
- Use php array outside his function
- PHP Use Declared array Variable inside already Declared Array
- A better way to write this php function
- Why is my array_diff usage breaking things?
- Grabbing value of input field inside of array
- save array of objects with update_option
- Custom WordPress Function – Adding items from Foreach Loop into an array and Updating Field based on array of IDs (ACF + WooCommerce)
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- PHP – Converting elements to actual values