1
vote
2answers
106 views

Exclude subscriber users from user list

I want to exclude Subscribers from a user list. My code is: $users = $wpdb->get_results( "SELECT display_name FROM $wpdb->users ORDER BY display_name ASC" ); How can I change that so ...
3
votes
2answers
192 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 ...
2
votes
2answers
536 views

How to programatically change username (user_login)?

As in the title, how to programatically change user's login? I wanted to use wp_inser_user function, but it appears that when updating current user, it doesn't change his/hers username. Should I use ...
1
vote
2answers
177 views

Getting all the users who have author privilege

Can anyone tell me how to get all the users who have author privileges by querying the DB in WordPress and order them by number of posts written by them. I use the following query to get all the ...
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
226 views

Select From wpdb - Author/User Directory page

I am working on a wordpress site where I have created a directory page(authors.php) that lists all users and certain author meta. It works fine however I am trying to figure out how to only show ...
2
votes
2answers
984 views

Creating a Front-end based User Search

I am working on a membership site which requires a front-end user search. I have been searching for an answer like a mad man, and I could really use some help! While there are several plugins that ...
1
vote
0answers
172 views

How to display users with posts published between two dates (Sorted by Post-Count) [Multisite]

I'm trying to make a list of users who have published posts within two given dates. My attempts using WP_User_query just work for one blog ID and takes time to load because it runs through a lot of ...
0
votes
1answer
448 views

Best practice to import user base (subscribers) from one website to another?

I want to import users from a Wordpress installation to another. Same domain, but complete different websites. Website A (old, 700 users): running WP3.0 plain installation + BBPress 1.x Website B ...
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 ...
3
votes
3answers
681 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 ...
1
vote
2answers
2k views

mysql query two database tables, users and usermeta and sort by custom meta int value

I am trying to get an array of site users sorted by a custom meta value (an int). I can query the users just fine and get them back to use in a foreach. I currently have the query results come back ...
1
vote
1answer
278 views

In what part of the Wordpress core does the users table and usermeta table get joined?

I have been trying to work out just where in the massive jungle of Wordpress include classes the usermeta table is joined onto the users table and if so, how does it work? The one confusing thing ...