[wp-hackers] Re: Sharing Users/authentication

Christian Höltje docwhat+list.wp.hackers at gerf.org
Wed Aug 29 14:24:53 GMT 2007


* Stephen Rider (wp-hackers at striderweb.com) [070828 16:40]:
> 
> On Aug 28, 2007, at 3:22 PM, Mark Jaquith wrote:
> 
> >On Aug 25, 2007, at 12:20 PM, Stephen Rider wrote:
> >
> >>The problem appears to be the "wp_capabilities" and  
> >>"wp_user_level" fields in the wp_usermeta table.  WordPress needs  
> >>these field names to match the active table prefix.
> >
> >This was an intentional design decision, to allow users to have  
> >different permissions on different blogs.
> >
> >Still, it might be nice to have a "unified permissions" mode  
> >whereby the slave installs use the master's permissions.
> >
> >I've opened a ticket to that end:
> >
> >	http://trac.wordpress.org/ticket/4846
> 
> Jamie says:
> >The capabilities are stored as
> >{tableprefix}_{blogid}_capabilities, so it would be something like
> >wp_1_capabilities.
> 
> Okay, so this is something that was implemented for WordPressMU, but  
> it's 1) not fully implemented, as the {blogid} in her example is not  
> present, and 2) it's not necessary for vanilla single-user WordPress.
> 
> I understand its usefulness for MU, but is there any reason for it to  
> be here in regular WordPress?  Since there is a code difference here  
> anyway (compared to MU), why not just remove this redundancy entirely?
> 
> That seems far simpler (and less bug-prone) than adding code to  
> distinguish between two options -- one of which isn't used!  :)

Furthermore, you can include the blog 'prefix' in the table itself.
Just add a new column.  Creating new tables every time is silly and
not normalized db design.

Ciao!

-- 
With or without religion, you would have good people doing good things and evil people doing evil things. But for good people to do evil things, that takes religion.
       -- Steven Weinberg, quoted in The New York Times, April 20, 1999

The Doctor What: Guru to the Gods                http://docwhat.gerf.org/
docwhat *at* gerf *dot* org                                        KF6VNC


More information about the wp-hackers mailing list