User meta data consists of key-value pairs pertaining to the according user ID.

learn more… | top users | synonyms (2)

0
votes
1answer
9 views

update_user_meta adding new rows in db for same key

I have added new user meta for a given user. Let's call it title. Every time I run $user = get_user_by('login',$username); update_user_meta($user->ID, 'title','Manager'); The meta is not ...
1
vote
0answers
24 views

get_user_meta returning old data

I have a page template that creates a user directory listing for certain of my site users. I have no caching plugin and I get the same result from local development server, remote development server ...
0
votes
0answers
21 views

How do I add and verify new user meta data?

I'd like to give users a field that they can fill out -- with an option for me to verify / not verify. Take for example every user has a field -- Total Cars Owned : [number] They can enter in ...
1
vote
0answers
17 views

Why does the usermeta table contain html entities?

As a plugin developer, I have been storing special characters like ampersand as is in MySQL tables, then converting them to html entities after retrieving them for display. Now I discover that (for ...
0
votes
0answers
19 views

Multiple Values for one meta field group

Im using WP (Buddypress specifically) to allow users to upload their job and education experience. I need to allow users to upload multiple instances for each (most people have gone to more than 1 ...
0
votes
1answer
22 views

update_user_meta(): invisible data storage

I try to customize users profile using this code (from this tutorial) : <?php function extra_user_profile_fields( $user ) { ?> <h3>Autres</h3> <table class="form-table"> ...
0
votes
1answer
43 views

Extend WP_User_Query or WP_User to return all custom fields?

I'm trying to pull out list of about 5000+ member records for CSV export. The query is timed out and I suppose the reason is that in order to populate the CSV file I need to iterate over those 5000 ...
0
votes
0answers
12 views

How to change select field option pragmatically?

I have created one custom field (field type select) with the name specialization and have multiple options like doctor,dietitian in users profile in back end this fields are visible. suppose user ...
0
votes
1answer
38 views

How to add quick edit and bulk edit fields to users admin section

Salutations, is there a way to add quick edit and bulk edit fields for the users section in wordpress. I have found a lot about post types and custom post types but i'm specifically looking to add ...
1
vote
1answer
26 views

Send mail to user only once when specific check box is selected and updated from profile meta updated by admin

Here i have created one checkbox in admin of the wordpress and when i check and update it send mail to user it works but its sends mail every time when any part of profile is updated.Is there a way to ...
2
votes
1answer
17 views

What is the meta-box-order_post_hash used for?

meta-box-order_post_hash is stored as an user option. I am sure it's related to meta-box-order_post but I could not find anything in the codex about it. So what is it for? And how can or should be ...
0
votes
0answers
16 views

Custom Permalink with Custom user meta mapped to posts published by user

I want to map a custom user Meta to the permalink in the form of http://localhost/%user_meta%/posts. The user_metais a custom user meta whose id=brand. The URL http://localhost/%brand%/posts should ...
0
votes
0answers
35 views

get user role value as a string from wp usermeta table into custom script

Just came accross while retriving wp_capabilities from wp_usermeta table, this returns serialize output a:1:{s:13:"administrator";b:1;} When i unserialized, it gives an array Array ( ...
0
votes
1answer
35 views

Username has been exposed

I am running a WordPress installation, I am using the theme created by my own. I haven't displayed any author related information in the theme. But I am getting server logs with ...
0
votes
1answer
24 views

WP_Query within save_post doesn't include the item that triggered the action?

I'm using Advanced Custom Field's acf_form function to expose a front-end form for users to post content on the website. Users will be submitting photos of redfish they have caught, and one of the ...
0
votes
3answers
37 views

Create new user from phpMyAdmin

I'm trying to copy site that I have created in free web hosting server to my windows pc that runs WP on WAMP. I copied all files, but took wp-config.php from sample site I run on my PC and have done ...
0
votes
1answer
44 views

get_user_meta returning empty when it's NOT empty

I am writing a filter. Here is the scenario... it's for a website selling yoga retreats. I have successfully created a new meta profile field called "retreat_contracts" which is meant to store the ...
0
votes
0answers
29 views

How to use Buddypress xProfile field as Wordpress Bio

First time using this forum. I need some serious help with this question. I am trying to display a user's bio without using the backend. Reason being, I do not allow my users to go through the backend ...
0
votes
1answer
129 views

How to get users by a custom field / by user meta data?

I've added a custom field to users profile using the following code: /*** Adding extra field to get the the user who creates the another user during ADD NEW USER ***/ <?php function ...
0
votes
0answers
65 views

View Gravity Forms data on a users papge

I am a newb to the CMS world. I decided to use Wordpress along with Gravity Forms to build a website. I'm using Gravity Forms along with the User registration add-on to gather the data I require, ...
0
votes
0answers
38 views

How can I programmatically show a specific (template) page, like author.php?

My current, hacky way, is this: Right now, in my functions.php file I have something like this: /** * Create the query var so that WP catches the custom /profile/username url */ function ...
1
vote
0answers
57 views

Extending WP_User class and using this sub-class during the whole lifecycle

I am currently struggling with this software design issue I can't seem to get hold of. What I am trying to achieve is the following: for every user on our website, I want to do an API request to a ...
0
votes
0answers
29 views

When to hook into edit profile action?

I have the following function which combines the values of a few user profile fields and saves them as a new user_meta called COMBINED_WORKSHOPS. The function works, but I don't know when/where to ...
0
votes
0answers
78 views

Limit the number of successful logins

I would like to retrieve the number of successful logins of a user and act accordingly. If user logged in more than 10 times, then log out user automatically with wp_logout() or similar. I would ...
0
votes
0answers
27 views

How can I detect if user has subscribed Memberpress product already

How can I detect if user has already bought a memberpress product. I'm searching something like this: if(have_subscription){ //code to add button }else{ // code to add something else } I have no ...
0
votes
1answer
10 views

User biographical information erased on login

When any user logs into my Wordpress install, it deletes their biographical information for some reason. I know this by watching the value of a query similar to select*from wp_usermeta where ...
0
votes
1answer
121 views

Get an array of meta_values for a user meta_key

I need to get an array of all the meta_values for a user meta_key. I found this code: $cities = $wpdb->get_col("SELECT meta_value FROM $wpdb->usermeta WHERE meta_key = 'my_cities_meta_key'" ); ...
0
votes
1answer
79 views

List users by meta_key and meta_value

The following function will display a list of users based on their meta data: <?php function get_users_by_meta_data( $meta_key, $meta_value ) { $user_query = new WP_User_Query( array( ...
0
votes
1answer
37 views

How to add an attribute to a user?

I have looked for an answer, and couldn't find a clear and relevant answer yet. I want to add more attribute to the users not to display, but only store information about them. The information will ...
0
votes
1answer
145 views

How to save multiple options from a dropdown in user profile

I use this code to create the dropdown and then save the dropdown chosen values: <?php // Display Fields add_action( 'show_user_profile', 'add_multiple_choice_dropdown ' ); add_action( ...
0
votes
2answers
67 views

WP_User_Query not returning users with meta - what am I missing?

I think I'm missing a step here, but for the life of me I can't see it. I'm trying to display a simple list of users who all have the same role and have the same meta data value for a certain key - ...
0
votes
1answer
85 views

add_post_meta | update_post_meta | Via the frontend

I am having a difficult time trying to figure out how to save user meta data to a post. The goal that I am trying to accomplish is this, have a user make a selection from a drop down list, and save ...
0
votes
1answer
53 views

How can I include user meta information in the resulting array of a WP_User_Query?

I'm trying to accomplish some fairly complex custom functionality on a custom WordPress site. The client has an 'About Us' page that includes a list of all team members and their pictures. We're ...
0
votes
1answer
16 views

How do i put in user id in a banner

I would like to know how im gonna put in a user id in a banner. For example. I have 5 logged in persons on my page, and 3 of them has clicked on the same banner, but I need to know who is clicking. ...
0
votes
1answer
73 views

Update user meta without lose of old data

Is this is possible to update the user meta without lose the old data it have ? For example : i have the following data in my user meta field name user_documents ...
0
votes
1answer
128 views

How to delete only user meta value (not key) from usermeta table in wordpress?

I store multiple image in media library and save its id in wp_usermeta table. my metakey is 'images' and meta value in like '279,280,281'. Now I get the image from table like this: <?php $images = ...
0
votes
1answer
63 views

Multiple meta values for one meta key

I have one meta key "game" containing this meta value "game 1, game 2". I would like to display this meta value on my site like this: <a href="http://www.url.com/game-1">game 1</a> <a ...
0
votes
1answer
36 views

Plugin will sort users by usermeta

As I refine my most popular plugin it will store a special number decoded from the user's birth date, which is an extended BuddyPress field in bp_xprofile_data. All users get a number between 1 and ...
0
votes
0answers
89 views

Display Users by usermeta using foreach loop with multiple relationships

I'm getting a real headache trying to sort this one out. Here's my problem: I'm working on a feature for a site that requires Users to be displayed according to their association with a common ...
0
votes
1answer
350 views

generate unique number when registering a user

I know there are userID, username in the database, but I want a formatted and unique number for physical world use. For example: "2014xxxx" 201414:year,xxxx:generate randomly when registering a user. ...
1
vote
1answer
38 views

When is a user's meta data table loaded?

Exactly when is a user's meta data loaded? I'm using many get_user_meta() calls for the current user. If all of a logged in user's meta data is loaded anyway, then this type of call is not a problem.
0
votes
1answer
72 views

Function that prevents users from uploading photos more photos

Mjello, I'm struggling with this function that prevents users from uploading more photos than what their membership are entitled to. So they have 10 photos to upload. When they've reached 0 they ...
0
votes
1answer
122 views

User list order by user meta

i have created user vote that can vote users or author of posts. so for example have 4 users which looks: user --- ID=1 --- META KEY='_thumbs_rating_up' --- META VALUE='13' user --- ID=2 --- META ...
0
votes
0answers
26 views

Custom Post Type with /%shop_name%/gallery/%gallery% permastruct?

I have created a custom user meta = shop_name in User Profile and custom post type gallery I want my permalink to be in form of /%shop_name%/gallery/%gallery%. Every user has a custom user_meta = ...
2
votes
1answer
399 views

Searching user meta using WP_User_Query

Per the documentation for WP_User_Query, there is an available search parameter. It looks something like this: $users = new WP_User_Query(array( 'search' => 'This is my search' )); You can ...
0
votes
0answers
187 views

SQL query equivalent to WP User Query

I have the following WP user query code: //Get all users sorted by whatever $sorted_users = new WP_User_Query(array( 'orderby' => 'meta_value', 'meta_key' => 'satisfaction_rating', ...
0
votes
2answers
97 views

get_users with Serialized Custom Meta Value

I'm attempting to use get_users to select users with only a certain meta value. In this case the meta key is extraInfo but the the values are in a serialized array. Can I pull users out like this? ...
0
votes
1answer
424 views

Get all user meta by meta key instead of ID

I'm trying to compare user meta values to find highest and lowest values. I have a user meta value set up called "hourly_rate". I want to get the hourly rate for all users and then run PHP's min() and ...
0
votes
2answers
90 views

Create reviews and star-rating for user accounts in wp-admin [closed]

I would like each and every user to have the rating in stars and a review along with it so that any user can rate them using JavaScript 5 stars. The various reviews along with stars rating should be ...
0
votes
0answers
17 views

MySQL Trigger Help

I followed this question's answer to make my multiple wp installations to use a single user database, I want this: to happen every-time a new user registers. Can someone teach me how to make a ...