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

learn more… | top users | synonyms (2)

8
votes
3answers
2k views

How to create a front end user profile with a friendly permalink

I want to create a public front-end profile page with a friendly url like this format. mysite.com/user/someusername Any idea on how can i achieve this? I know it has something to do with rewrite ...
5
votes
2answers
754 views

get_users is expecting unserialized meta_value

I'm trying to get all users assigned to a custom usermeta. I know that get_users() is supposed to work; however, it doesn't seem to be working. What I have is a usermeta storing a category ID and I'm ...
5
votes
3answers
5k views

Get basic Image Uploader on User Profile Page

I am trying to add an image uploader to the user profile pages. I do have it up and running on a basic registration page, but somehow the same, but slightly adjusted code does not work when added to ...
5
votes
3answers
353 views

Add default WordPress tag meta box to User Profile

I've set up my user profiles to allow custom taxonomies following this tutorial. Ideally, I'd like to use the default Tag meta box from the Post screen, so users can easily add new taxonomies and ...
4
votes
2answers
751 views

user_login vs. user_nicename

When you call the get_users() functions, a list of user objects are returned. Each of those users has a number of properties. What is the difference between user_login and user_nicename in those ...
4
votes
1answer
93 views

How to create a template for a custom URI associated with the user

I am working on a site where I am using a plugin called Favorite Posts so logged-in users can add a post (a custom post type) to their favorites. I created a page called my-favorites which allows the ...
3
votes
2answers
1k views

get_user_meta() to Return User Meta Only for Current Blog in Multi Site

I've written a plugin that allows users to bookmark their favorite posts, but have run into a small problem when using it on a multisite network. Each time a post is bookmarked, the ID of that post ...
3
votes
5answers
3k views

Problem storing arrays with update_user_meta

I am writing a function that adds an ID number to an array and puts the array in the usermeta. $_GET['auction'] is the post_id. Here is the function: $reminders = ...
3
votes
1answer
378 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?
3
votes
3answers
865 views

wp_get_current_user always returns 0

I'm new to wordpress and modifying the code that's already working on a website. I want to get user's ID but I haven't figured out yet how. The following sample code works on my local environment but ...
3
votes
4answers
707 views

If Else Gravatar Author Picture

Ok so i have added a custom field inside of the WordPress edit profile field where a contributor and above can add a custom image if they do not use gravatar. Now i am trying to write a if else ...
3
votes
3answers
678 views

LEFT JOIN, INNER OUTER JOIN, LEFT OUTER JOIN is driving me crazy. Please help?

fellow coders! I an having a hard time JOIN(ing) tables. I have a a lot of users on my site and many of them have the same last names. I am trying to get their emails by their last name. WP stores ...
3
votes
2answers
3k views

Allowing an email as the username?

Is it possible to allow people to utilize their email as their username?
3
votes
2answers
8k views

How to get a buddypress user profile link and a certain user profile field for the current post author?

I want to replace get_author_link() and get_the_author_meta($feld) with something equivalent to point to the author of the current post Buddypress user profile page and retrieve a specific profile ...
3
votes
1answer
302 views

Show Biographical Info while creating new user

Is it possible to show the Biographical Info textfield while creating a new user? I know it's possible to add user bio by editing a user AFTER it has been created. But I would like to do this while ...
3
votes
1answer
186 views

Connect Users and Taxonomies

I'd like to send email notifications when new posts are saved. But users can select post categories they want to subscribe to. Available plugins are no solution to me – I really need my own code base. ...
3
votes
2answers
926 views

How to display custom user meta from registration in backend?

I'm considering using the hooks for the WordPress registration form to add some custom fields: https://codex.wordpress.org/Customizing_the_Registration_Form My question is, if it's even possible, how ...
3
votes
2answers
189 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 ...
3
votes
1answer
242 views

How do you make the email field on the profile page read only for subscribers?

I would like to make the email field on the profile page for subscribers read only. They can see their email but not change it. I want only admins to to be able to change users email address.
2
votes
1answer
310 views

How do I update a specific object in an array, in user meta?

I have this array, below, to set custom user meta (lh_userbadges) in user_meta but I'm not exactly sure how to update just parts of the array later on... $lh_user_badges = array( ...
2
votes
2answers
2k views

Can I create front-end editable user profile pages with Wordpress? How do I do it?

I'm trying to build a WP site where using the front-end, each user can: Register through the front end using basic fields Log in Create their own profile page using multiple forms Upload text, image ...
2
votes
1answer
279 views

Post-Registration, post-meta hook?

Is there a hook in WP to access meta data of a user JUST after they have registered and meta data has been added to the database? I was reading to use profile_update, but wouldn't that be invoked ...
2
votes
1answer
620 views

Add mass action to wp-admin/users.php

I'm heavelly modified my Wordpress, it's amazing what you can do with wordpress hooks, actions.. But i'm not able to find how can i add mass action for users. Let's say i select 5 users and i want to ...
2
votes
2answers
1k views

Displaying additional User Contact Information

I have been advised how to add additional contact info fields to the User admin area here (Click here). However, I am not entirely sure how I can display the the field contents in a link within my ...
2
votes
2answers
2k views

How to search for users based on added user metadata

I have added several new fields to the user profile (areacode, company, affiliate, etc) and I would like to present a way to search on these fields. Please point me in the right direction.
2
votes
1answer
206 views

How to create virtual pages with information from user meta profile fields?

Dave Jesch on his site presents a way to create virtual pages in WordPress. Dave created a class "to do all the heavy lifting", as he says. I think, for my purposes this class not require changes, so ...
2
votes
1answer
216 views

Add a member number to new user

I need to add a number to user as meta info (it's a 5 digit number) at the time they register. I assume I would use the user_register action to call a script. I also assume I would use ...
2
votes
1answer
265 views

Querying Email Addresses for a List of Users with Same Last Name?

I have a site with many users and many of them have the same last name. I want to get the emails of all the users with the same last name (IE: Smith) that has a post related to a particular taxonomy ...
2
votes
1answer
533 views

get_usermeta() deprecated in favor of get_user_meta(). But why doesn't it make use of it?

While coding WP I just wondered about this simple fact: get_usermeta() is deprecated since version 3.0. The warning suggests me to use get_user_meta(). Even the parameters are pretty similar, I ...
2
votes
0answers
73 views

Content hooks vs User hooks

This is more of a theory question than a question with a direct answer. I've been working with different actions for firing functions when a post is updated or deleted and when users are updated or ...
2
votes
2answers
1k views

wp_update_user not updating

In desperation I am asking for help in this forum too - if someone (ANYONE!) could take a look a this post and see if they could help I'd be eternally grateful ...
1
vote
6answers
3k views

Adding fields to the “Add New User” screen in the dashboard

I'd like to add the field "Company Name" to the add new user page in the admin panel. I've done quite a bit of searching and have been unable to find details on how to do this. I can easily add info ...
1
vote
2answers
2k views

How do you update user_email on the front end in WP 3.3?

I am using the following code and everything in the user profile is updating except the user's email. In the template: global $current_user, $wp_roles; get_currentuserinfo(); /* Load the ...
1
vote
1answer
1k views

Getting $user_id for the_author_meta outside the loop in multisite

So I am currently running a multisite install where the super admin creates all new sites. One of the templates we're using has a blog page for a loan officer. I am extending the user profile so the ...
1
vote
1answer
559 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 ...
1
vote
1answer
87 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?
1
vote
1answer
404 views

remove user_meta data from database for all users

I'd like to create a button for admins to be able to delete from table wp_usermeta -> key: 'ref_credit' for all users. Is there simple resource friendly way to do this? does wp have built in function ...
1
vote
1answer
687 views

How to loop through each user id?

The functions that I am aware of: WP_User and wp_get_current_user seem to only get the user object of the current user. As an administrator, if I want to display certain profile information in a ...
1
vote
2answers
453 views

What's the most efficient database method to add and query usermeta?

What's the most efficient way - concerning the database - to add and query extra usermeta fields to a profile? I need to add four additional fields of numeric and text data to a user profile and then ...
1
vote
1answer
185 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?
1
vote
1answer
295 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 ...
1
vote
1answer
116 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
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 ...
1
vote
1answer
1k views

Plugin that would allow WordPress Authors to “follow” other Authors and query “Activity Info” from that

I have a WordPress blog that is all user based Authors that submit content and such. Currently in the site, you can view other authors profiles but basically just view their content from the ...
1
vote
1answer
70 views

How to store custom user data on the database?

I'm developing a WP multi-site network which have a goal of 10,000 sub blogs. The site needs to store custom data related to the user. There are additional 20 fields of data for each user. What is the ...
1
vote
1answer
43 views

A field with dashes in the slug [closed]

How do I reach a specific userdata in the database, when that field has a dash (hyphen) - in the slug? I use the plugin WP-Members. I have created a new userdata field with the plugin with the name ...
1
vote
1answer
180 views

Get user's ID on logout

Is it at all possible to get a user's ID in a function right at the point of log out? I tried to hook it to wp_logout, but it just returns null when trying to get the user's info. I'm wondering if ...
1
vote
2answers
57 views

Average Account Age

I'm trying to see if there is a way to find an average age of user accounts which came through my wordpress site not including the age of the administrator account. When I say age I don't mean their ...
1
vote
4answers
444 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?
1
vote
1answer
310 views

Get the Google+ and Twitter links - Wordpress SEO plugin

I want to use the Google+ and twitter links that can be added in User's profile using the WordPress SEO plugin and display them on the author page. Is there any way I can get those links from the ...