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

learn more… | top users | synonyms (2)

3
votes
2answers
227 views

Search multiple meta keys at once

How would I modify the following SQL Query to allow me to search multiple meta keys at once? e.g. user_business AND user_about In the end I'll be searching about 40 - 50 different meta keys; or if ...
0
votes
1answer
216 views

WP_User_Query not searching

I currently have the following code, and a user named "Clark Farm" in the user_business table. The code below returns nothing. If I remove the search term then all of the users are listed. I'm trying ...
3
votes
1answer
581 views

Where the Nickname is being used in WordPress

I see most of the place is using the "Display name", so why I need to set a Nickname? Where it is being used?
0
votes
1answer
39 views

Display all existing members

How would I (using a loop) pull in all of the existing users? I'm trying to loop through these users and then pull in meta data for each one.
0
votes
3answers
169 views

custom user meta query

I've been trying to get this query to work but it keeps failing to return any rows SELECT a.ID FROM wp_users a, wp_usermeta b WHERE b.user_id=a.ID AND ( (b.meta_key='firstname-groom' AND ...
0
votes
1answer
118 views

how do I add role and capability after I create a new user

I have a simple requirement: 1. create a user 2. create a role for the user 3. add capability for the role First, create a new user $uid = wp_insert_user($userdata); Second & Third, create a ...
0
votes
1answer
59 views

Array of user ids to list of user names

I'm outputting an array of user ids from metadata like so: $awaygoalby = unserialize($post_meta_data['report_away-scorers'][0]); and I want to change each user id to the user name. So I was hoping ...
0
votes
1answer
97 views

Using IDX feed to display agent's and listings with agent's info associated for Real Estate Website

Trying to figure out how to get a user/agent to be associated with their IDX/mls number. Have been trying to find a way around this since Diverse Solutions does not give a feed for agent's info, ...
0
votes
1answer
28 views

Get user_meta values for a user for an array of meta_keys?

I would like to retrieve the meta_values for an array of meta_keys for a user. Is there a function in WordPress core that offers this functionality? Something that would work like this: ...
1
vote
1answer
239 views

Showing user ID on user main page from screen options

On the user main page in the screen options, you have some choices for displaying user information e.g.. e-mail, role, posts etc.. Is there a way to be able to display the user's unique ID?
0
votes
2answers
286 views

Show image if author meta (profile fields) exists outside loop

I am trying to show the profile fields (like AIM, Jibber) outside the loop. I managed to do that with <?php global $post; $author_id=$post->post_author; ?> <?php $field='aim'; ...
0
votes
2answers
44 views

User Meta stuff

Ok I am trying to make a page the list user meta. http://pastebin.com/rw1t7Mgp The part I am stuck on is $our_children = get_user_meta ($user_id,"our_children"); it is a meta field with an array ...
0
votes
1answer
31 views

How to store array in usermeta in wordpress

I have a custom user registration form and am trying to store multiple values in the usermeta. This is a sample code I am using, however it just stores the last option selected (i.e. if I select from ...
0
votes
1answer
301 views

Reduce number of SQL queries inside WP_Query loop to fetch author data

This question applies to scale and does not concern typical blog implementations. I'm working on a web app where I'm running standard WP_Query to fetch some custom post types. This usually results in ...
0
votes
1answer
236 views

Display Country Flag in Profile Wordpress/Buddypress

Hoping someone could help me with a question regarding displaying country flags next to a member name. Right now I am using a custom meta containing country and then echo the flag back if the ...
1
vote
1answer
132 views

Query users by capability - uninstall/deactivate callback

The situation Running on MU, I'm writing an open source/publically and freely available plugin. As I used add_screen_option() to allow users to easily setup the admin page to their likings, I'm left ...
0
votes
1answer
48 views

Matching usermeta at registration to categories of content

I'm trying to connect some user_meta data from registration form to some categories set up in admin to filter the presentation on the page. This one is tripping me up because the question has multiple ...
0
votes
1answer
74 views

Get custom_user meta value and add entry

I created a custom user meat value and want to add a new key/value to this array. But somehow I can't get it to work correctly, I always get a new array in side the array so that I always have e new ...
1
vote
0answers
107 views

Update User Meta after Registration [closed]

After a user registers, I am creating two pages of two different custom post types, and then need to store a custom meta value in their user data to assist with redirects later. I've found that if I ...
1
vote
1answer
355 views

Separate table or usermeta

We are creating custom fields for users like annual income, gender, city, country, etc. There are about 10 odd new fields. We will be importing approx. 30,000 records for each user in a month through ...
0
votes
0answers
106 views

get_the_author_meta

I am just wondering if get_the_author_meta() returns value after unserializing in case it is stored in database as a serialized array? Until today, on my script, this has been returning data in form ...
1
vote
1answer
788 views

User defined password at registration - registration email sends auto generated pass

Updating some meta fields on registration and providing the user the option to pick a password yet the registration email sends the auto generated password. User defined password works and not emailed ...
2
votes
1answer
352 views

update_user_meta doesn't work with AJAX

I try to keep user subscription in a metadata var. The function is called by AJAX. Ahe AJAX is called but the metadata does not seem updated on frontend. Here is the code: jQuery <script ...
1
vote
1answer
269 views

How to save data of an input field to an array

I'm writing a plugin to edit my profile page. How can I save data of an input field to the database and then display it? This is my code. The first part is the display in HTML: <form method ...
0
votes
1answer
242 views

duplicate user metadata key values

I've spotted that some of my users have duplicate metadata key values (my only fault because i inserted data directly to the wp_usermeta table!). This query for example SELECT * FROM `wp_usermeta` ...
-1
votes
2answers
1k views

Show User Their Password

I've got a few automated scripts that run to notify users of certain updates to the application, etc... and for one in particular, I need to be able to display the users user_login and their password. ...
1
vote
2answers
190 views

Can I prevent “wp_user_level” from getting added to wp_usermeta on registration?

I've heard this meta key is obsolete, but they are still getting created every time a user registers. Can I prevent this? I'm trying to slim down that table.
1
vote
1answer
917 views

How to get user-meta from Social Login registered users?

It looks like social login plugins (such as Wordpress Social Login, OneAll etc.) do not create users in the original wp-database as regular registration from Admin dashboard. Hence it is not possible ...
1
vote
1answer
713 views

Extend the wp_users table

I'd like to to extend the wp_users table in my WordPress' database. Why? I want people to add more information about themselves when they sing up at my website. I know how to extend it, but I'm ...
0
votes
1answer
157 views

Distinguish profile user and admin user IDs / get ID of user being edited

On the user-profile page of my site I want to allow admin role users to be able to edit specific user-meta fields of subscriber role users. How can I distinguish between the two user IDs. The ...
1
vote
1answer
122 views

Possible bug: update_user_meta is updating two unique meta entries

On a CPT page I am checking to see if the user is logged in; if they are, I'm checking to see if they have a meta entry which is 'session-' + the current page's stub. If they do, I increment the value ...
1
vote
1answer
93 views

Is it possible to store visitors IPs in wp_postmeta table?

Or in any of the other 11 Wordpress tables. I also need to store: submission date, name, contact number in the same table. What approach would be best? A custom table or using a standard table?
0
votes
1answer
39 views

Test if key is in user_meta array

I want to associate certain users by means of a custom key stored in the user_meta for both users. There may be more than one-one relationships, so it'll be in an array. If 2 users have the same key ...
0
votes
0answers
24 views

How can I display all the blogs where this user is editor in Wordpress Multisite? [duplicate]

Very similar question with correct answer I guess my question is simple, I run multisite and on some blog I want to display <> thing The link I posted does not work for me, but it is marked as ...
1
vote
1answer
428 views

Show individual author rank from query of cumulative post view count for all authors

I originally was going to post a question on how I would go about ranking a list of authors by the amount of post views from all of their posts combined. But I luckily found a solution here: List ...
0
votes
1answer
569 views

get_user_meta() doesn't include user email?

I simply wonder why <?php var_dump(get_user_meta(4)); ?> doesn't contain an email address of the user. Instead I have to use get_userdata(4)->user_email; to query the email of the user. ...
0
votes
1answer
129 views

Countdown to date function?

When a user signs up on my site they have to select a date as part of resignation. On their profile page I need to show a countdown to that date. Something simple like attached. How can I create this ...
-1
votes
1answer
266 views

Problem with update_user_meta() meta_value

I am trying to insert a large number of user in to the wordpress db using wp_insert_user(). After inserting each user, I am trying to add an user meta for each user. I am doing like this: $meta_value ...
0
votes
1answer
71 views

Sorting custom post type by usermeta

I have a profile (a CPT) directory set up and I'm trying to find a way to sort the results based on the last login time of the post author. The goal is to reward recently logged in authors by pushing ...
1
vote
1answer
2k views

wp_update_user doesn't update and update_user_meta does

I'm building user profile page where users could update their profile on the front-end. User profile is extended with a few custom fields, like 'Twitter', 'Facebook' and 'City'. The following code ...
0
votes
1answer
29 views

What is best for saving lot of extra detail of user?

In my site i need to store 200 extra data for each user. Now i know about the user meta option. But is it a good way to save 200extra field for each user? Or should i create an extra table in the ...
0
votes
2answers
319 views

Getting list of top 10 users and sort on last name

I would like to display a list of the top 10 authors based on the amount of posts that they have, and then sort them on last name. To my knowledge, this is not trivial since the last name of a user ...
1
vote
4answers
716 views

How we can get the user id by its display_name

I have user display_name and with this I want to get the id of that user. So, how can I get the user id?
0
votes
1answer
60 views

How to relate the Category to user?

I am developing one new plugin, In that i had a section to create new category, and having the field Created By(listing all the users in this field). I am storing the category name in WP_terms and ...
0
votes
1answer
50 views

Identify admin/logout and more filters

I have several links I need to apply filters to them. Having hard time understanding from the documentation which are the correct filters I need to use. I am not using the default theme. This links ...
1
vote
1answer
127 views

Memory usage for scalable usermeta queries

Problem Some time ago I posted a question about the scalability of wp_usermeta architecture: my concern, as my client's database of users is growing fast, is now the memory usage of querying the ...
0
votes
1answer
149 views

update_user_meta updates to a wrong ID

Background Problem The site I'm working right now uses custom front-end forms for content, terms and user editing and creation. Access to wp-admin is blocked for non administrator. All of them uses ...
2
votes
2answers
415 views

How to use hyperdb to separate and share a user dataset between wordpress installs?

I'm looking for a way to separate my users and usermeta table to be in a different database than my main WP install. The end goal is sharing these table over a number of WP installs. From what I ...
0
votes
1answer
208 views

How do i get a specific user metadata using custom metavalue outside of wordpress?

I need help. I need to get a user ID or email (email is can do but ID is better) based on their phone number, outside of WordPress. I already have their phone number in a variable and billing_phone ...
0
votes
2answers
835 views

How to: get_user_meta - BuddyPress [closed]

What is the proper way to display User Meta in the BP Loop using this line from codex? <?php get_user_meta($user_id, $key, $single); ?> I added that line to the profile loop and switched ...