[wp-hackers] User Capabilities

David House dmhouse at gmail.com
Mon Jul 18 09:10:14 GMT 2005


On 7/17/05, Ryan Boren <ryan at boren.nu> wrote:
> On Thu, 2005-07-14 at 12:06 +0100, David House wrote:
> > I think this is because WP_User::get_role_caps() is called from the
> > WP_User constructor, but at this time, the user doesn't have any
> > roles. The code in users.php to create a user looks like this:
> >
> > $user = new WP_User($user_ID);
> > $user->set_role(get_settings('default_role'));
> >
> > Now, WP_User::get_role_caps() will be called from the first statement,
> > but it's not until the second statement that the user gets a role set.
> > The warnings were all warnings to do with variables not being arrays:
> > foreach() and array_merge() were complaining. I'm pretty sure it's
> > replicatable; just try to create a user through the admin interface.
> 
> Should be fixed now.

It doesn't appear to be. Can no-one else replicate this?

Can you point me at the specific revision that fixed this?

-- 
-David House, dmhouse at gmail.com, http://xmouse.ithium.net


More information about the wp-hackers mailing list