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

learn more… | top users | synonyms (2)

0
votes
0answers
9 views

How can I create a search field that includes user meta?

I have a site with a number of users with a bunch of custom fields in the user section. I need those fields to be searchable by a user visiting the site. I'm not an experienced web developer but I ...
1
vote
2answers
65 views

How to get top 10 user is based on user meta value

I'm trying to get top 10 users in my wordpress blog based on user meta value. I've tried few methods & finally able to get just top one user using below wpdb query. But clueless, how we can get ...
0
votes
1answer
113 views

Updating user meta

I'm struggling to figure out to get the code to update a single current user meta. For instance if I want to update their first name automatically. I'm using $current_user = wp_get_current_user(); ...
0
votes
0answers
14 views

Globally Change Name of User Profile Fields

I am trying to globally change the name of user profile fields or add new fields to the users' profile (whichever is easier and takes less resources). I tried using something like: add_filter( ...
0
votes
1answer
87 views

How can I sort get_users() by any value (last_name, user defined fields and more)

I want to sort the result of get_users() by last name, first name, user defined fields or whatever. How can I achieve this while still using get_users()?
0
votes
1answer
77 views

wp_usermeta - Read from database, but save function broken

I added a custom field to the profile-page of WordPress users called "uidnumber" and it reads values from the database just fine, however it just doesn't save anything. I'd rather save it in ...
0
votes
2answers
41 views

How do I change the user via SQL?

I change a user via SQL in wordpress: SET @old_user='old_user'; SET @new_user='new_user'; UPDATE wp_users SET user_login = replace(user_login, @old_user, @new_user); UPDATE wp_users SET ...
0
votes
1answer
20 views

get users nickname uploaded media

I want to get the users nickname who uploaded a media file. I'm getting all media files with this code and want to link to the users nickname / profile <?php $args = array( ...
0
votes
0answers
24 views

How to Create Click Counter -User Meta-?

How can I update current user's score? What am I doing wrong? Here is my code: <form action="" method="post"> <input type="submit" value="click me!" name="clicks"> </form> ...
0
votes
1answer
13 views

Add method for tracking who referred new users

A client wants me to make somthing like user genealogy. It would work as follows: each user has a page that only they can access (or one page that loads from logged-in user) and on this page they ...
0
votes
0answers
39 views

How can checkbox be added in admin users list be made editable in edit profile page and save value as checked and unchecked?

Here is my code in functions.php function X_member_user_table( $columns ) { $columns['dbem_X_member_f'] = 'Discount'; return $columns; } add_filter( 'manage_users_columns', ...
0
votes
1answer
78 views

Edit Account - read and write to MySQL

I have user data that's being saved to and read from the database as they are all standard WordPress fields. example: $user->user_email And here's the code I have inside the ...
0
votes
1answer
156 views

Wordpress /users/me endpoint request forbidden

Using Wordpress's plugin WP REST API version 1, there is an endpoint called /users/me which response with data for the currently logged-in user. When I requested /users/me I got 403 Request Forbidden ...
1
vote
1answer
174 views

Admin user edit - Grab newly submitted user meta immediately after update/submit

I am trying push user update fields to an api via user profile edit or admin user edit. I have successfully allowed user to update their own profile and have it also update the remote api with same ...
2
votes
1answer
39 views

How to query users by meta value, even when meta key doesn't exist?

The problem is that users for whom votes_total doesn't exist are getting skipped. See below: $args = array( 'meta_query' => array( 'relation' => 'OR', array( ...
0
votes
2answers
57 views

Redirecting to an external URL

I want to add a URL on my website. Something like website.com/drive_folder When someone presses that link (and he can only see it on a page when he is logged in), it will send him to a Google Drive ...
0
votes
2answers
128 views

How to get its meta_value of a specific meta_key within wp_usermeta

Using the S2member plugin, a meta_key for the last-payment-time is automatically stored in WordPress DB under table wp_usermeta (custom field is called wp_meds2member_last_payment_time). From ...
1
vote
0answers
64 views

Hook or action to save profile fields at specific time

i want to make a field in the user profile to know who added this user, the problem is that this field displays the current logged in user, i wonder if the is a hook or action to make this custom ...
2
votes
1answer
473 views

Query users by custom taxonomy and user role

I'm trying to make a query for users using WP_User_Query() I need to filter users by role shop_manager and custom taxonomy called shop-category and current taxonomy term ID. The code I have so far: ...
0
votes
1answer
37 views

Find matches of a variable in custom usermeta

I have variable $var which is dynamic. I want to find if there are any matches of this variable in custom user meta - "authmeta" and return the user_id of the corresponding entry if any matches are ...
0
votes
0answers
20 views

How can I develop a plugin for Rating Authors?

I am well familiar with plugin development in WordPress and have an understanding of user_meta. I was trying to find a way to find a plugin to rate user_type:"Authors" but could not find.
0
votes
3answers
38 views

Need help getting a certain value out of a multi dimensional array

I'm looking to retrieve a specific meta value for users from the Wordpress types plugin. I know the value is stored in a wpcf-team-experience-member-type. This is a checkbox option and I'd like to ...
0
votes
1answer
109 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
63 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
60 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
22 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
78 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
55 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
262 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
24 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 ...
1
vote
0answers
438 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
61 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
65 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
23 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
266 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
44 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
77 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
71 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
457 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 ...
1
vote
1answer
104 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
2k 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
221 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
134 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 ...
2
votes
0answers
183 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
90 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
1answer
14 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
740 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
299 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
191 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
422 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( ...