[wp-trac] [WordPress Trac] #10201: Switch roles to use single role, and no user-specific caps

WordPress Trac wp-trac at lists.automattic.com
Sun Jul 26 18:54:56 UTC 2009


#10201: Switch roles to use single role, and no user-specific caps
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:             
     Type:  task (blessed)     |      Status:  assigned   
 Priority:  normal             |   Milestone:  2.9        
Component:  Role/Capability    |     Version:  2.8        
 Severity:  normal             |    Keywords:  2nd-opinion
-------------------------------+--------------------------------------------

Comment(by Denis-de-Bernardy):

 Replying to [comment:25 sambauers]:
 > "The other option is a whole new set of tables.. which.. those who are
 sane (And there are some insane people in WP Dev..) realise that its not
 really needed."
 >
 > Storing the role as a "varchar" in the usermeta table will require an
 additional column in the wp_usermeta table as current meta_value column is
 "longtext". If that change doesn't happen then the roles will still be
 non-indexed and there will be little or no speed improvement over doing a
 "LIKE" query on the existing serialised arrays.

 actually, there will. like is slower than =, and the meta key is indexed.
 but agreed on the note.

 the issue, however, is that we can't really add this in the users table
 either -- we'd need an extra column *per* site, unless the roles are
 shared across all sites. that would be a much more major change, but not
 necessarily a bad one.

 bottom line is, from a performance standpoint, a new table with an actual
 join would be *much* better, but probably not desired as things stand. we
 could bring this up during the next WP meet-up, though.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10201#comment:26>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list