[wp-hackers] select all users with role X

Ryan Boren ryan at boren.nu
Tue Dec 27 05:19:17 GMT 2005


On Tue, 2005-12-27 at 05:31 +0100, Denis de Bernardy wrote:
> Might make sense... Though, someone will likely come up with a plugin for
> others to use. ;)
> 
> Irony set aside, would storing this kind of data in a more rational way be a
> good feature for WP 2.1?

Someone could propose a schema and implement a replacement WP_User class
for everyone to argue over.  We could abstract these queries with
get_users_with_role() and get_users_with_cap() while we're at it.

In the meantime, plugins can check what levels are in a particular role
and query the user's level key for those levels.

Ryan

> > -----Original Message-----
> > From: wp-hackers-bounces at lists.automattic.com 
> > [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of 
> > Robert Deaton
> > Sent: Tuesday, December 27, 2005 5:23 AM
> > To: wp-hackers at lists.automattic.com
> > Subject: Re: [wp-hackers] select all users with role X
> > 
> > 
> > On 12/26/05, Denis de Bernardy <denis at semiologic.com> wrote:
> > > that's probably not an option with a large list. imho, create and 
> > > maintain a separate table.
> > >
> > 
> > So, any plugin author who wants to select users by roles, or 
> > even by multiple roles, should be expected to maintain their 
> > own table, or iterate over every user out of the database? 
> > Hell, we should just move to flat files for all of this, 
> > what's the point in using MySQL?



More information about the wp-hackers mailing list