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

learn more… | top users | synonyms (2)

0
votes
2answers
43 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
280 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
192 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
119 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
47 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
68 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
98 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
313 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
100 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
737 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
302 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
248 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
216 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
779 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
169 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
854 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
614 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
127 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
118 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
89 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
38 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 ...
0
votes
1answer
407 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
474 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
123 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
242 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
66 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
296 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
546 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
58 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
48 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
126 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
135 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 ...
1
vote
1answer
380 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
188 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
735 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 ...
0
votes
2answers
553 views

Ordering users of a specific role by last name

I'm trying to display a list of authors by their last name. I can get the list to display but as yet I don't seem to be able to order the list by last name. Any help would be greatly appreciated. Josh ...
0
votes
1answer
221 views

How to save a label for an extra user meta field and to display it later?

Bellow is how I currently add, save and display an extra user meta field: /* Add Extra Fields to the User Profile */ function extra_user_profile_fields( $user ) { ?> <table ...
0
votes
3answers
465 views

Display user meta data from a textarea as a formated text

With the below two functions I can add a textarea custom user meta field named 'publications' to the user profile and save/update it: add_action( 'show_user_profile', 'extra_user_profile_fields' ); ...
0
votes
1answer
515 views

Using and saving custom dropdown boxes on user profiles

Okay, so I'm creating a website and am in need of help for some custom meta fields for user profiles. Currently I have the following in my functions.php file: //hooks add_action( ...
0
votes
2answers
1k views

How to display some selected user meta data on a specific page with a shortcode?

I need to display on some specific pages some selected user meta data (not all), for some users. On the Wordpress Codex page for the get_user_meta() function we have this example (user_id = 9): ...
0
votes
1answer
443 views

gform_after_submission not working as expected

I am trying to augment a value to the wp_user_meta table, utilizing Gravity Forms. And I'm not having any luck. I had a version of this working on gform_pre_submission (though without the ...
0
votes
1answer
155 views

How to add to a user_meta field (append)

Is this possible? I want to use Gravity Forms or another hook to somehow write to the END of a user_meta field - not overwrite it. For example... Before: $purchase_history = ...
1
vote
1answer
198 views

Job of meta_key meta_value fields in database tables

I'm researching the structure of WordPress database and there is something that really get me confuesd. Could someone please explain, what is the exact job of meta_key and meta_value fields in ...
0
votes
2answers
1k views

get_the_author_meta not working

So I have this website that I am building and I am using get_the_author_meta to display various information about the user / author including user image. I added a function in my functions.php which ...
0
votes
2answers
308 views

How to build a fool proof AdSense revenue sharing model?

I have 5 author levels in my WordPress site. Levels are calculated using points - level 1 - level 2 - level 3 - level 4 - level 5 Authors getting impressions based on author levels like this. ...
0
votes
1answer
808 views

Validating a new user registration field

What I'm trying to do: Add new user meta fields that can be updated when the user edits their profile Validate them correctly when the form is submitted What I've done: I have successfully added ...