Description

Assume two instances of WordPress are installed to the same database for the purpose of sharing a user table. Registering a user on one instance (using db prefix "wp_") creates both the the wp_users data and the wp_usermeta data for that user. The wp_usermeta data contains the user capabilites.

Although the user login and password will be found by the second instance, there will be no default usermeta present for that login, and so the user does not have enough capabilities to log in.

A potential solution involves setting the (wp_)capabilities metadata to the default for new users when the WP_User class attempts to load caps for that user and finds nothing. If there are no elements in the caps array, it is safe to assume that the user did not properly have his caps created, since the WP_User::set_role() implies that all users must have at least one role, and roles are stored as caps. If a user has no caps, then the user has no role, and should then be assigned the default role.

They share usermeta but they don't share the capabilities field due to a per-blog prefix on the field name. The same user doesn't necessarily have the same permissions on each blog. So, ringmaster's fix is needed.

I need this fixed, but don't have the time to investigate, so I'm putting a bug bounty. $10.00 USD if a satisfactory working patch is up by 2006-02-15 00:00:00 GMT, $5.00 USD after that. PayPal only. May the best patch win.

Added the couple lines of code from ringmasters fix into the capabilities.php file and it worked like a treat. I have also modified the installation file to allow for multiple installations using the same user database.