I've played around with this a little and I kinda have it working, but not quite the way I'd like.
I am trying to integrate the following...
1) WordPressMU
2) Instance of WordPress 2.1.2 running with a "wp_" prefix. This happens to be a "sitewide tags" blog (see the mu forums to know more about this).
3) A second instance of WordPress 2.1.2 with a "events_wp_" table prefix, used as a special site news and events blog (different from the main MU blog).
4) bbPress
I've got everything using the same cookies, so single login works across them all. And the user tables are working pretty well.
EXCEPT... using Dan's 'default_role' suggestion exactly as above, I couldn't access the admin backend to my 2nd WordPress instance (with the "events_wp_" table prefix).
I looked at the code and realized it was because even though admin was a user it was only given 'default_role' rights.
I got around this problem by extended Dan's hack a little more. Namely, I added the following code...
if ( ! is_array($this->caps) ) {
$this->caps = array();
$this->roles = array();
$this->set_role(get_settings('default_role'));
}
if ($this->user_login == 'admin')
{
$this->add_role('administrator');
}
This works ok, but not great. For example, I'm not really able to use any other roles for users.
In looking at the code I wonder if the right fix is to adjust the $wpdb->prefix variable to match the prefix of the user table and user meta data. But my first attempt at modifying the "cap_key" and "role_key" didn't seem to work. Is there a good source of documentation on how roles and capabilities are handled in the code base?