So, I'm still totally confused, and wondering if my version of wordpress (just downloaded yesterday) isn't supported yet by this mod? I decided to trace through the mysql changes vbbridge is making to see what was going on, and found that my administrator users were getting the wrong meta_value in the wp_usermeta table (I'm using wp_ as my wordpress table prefix).
As a workaround, I hacked vbbridge.php in the plugins directory, editting line 492 of the most recent version of vbbridge. I commented out line 492, and replaced it with this:
$usermeta_value = preg_replace('/a:1:\{s:23:"administrator\|user role";i:1;\}/', 'a:1:{s:13:"administrator";b:1;}', serialize(array(strtolower(get_option('vbb_vbugrou p_' . $vbulletin->userinfo[usergroupid])) => 1)));
$sql = "UPDATE " . $GLOBALS['table_prefix'] . "usermeta set meta_value = '". $usermeta_value ."' where user_id = '". $results->ID ."' and meta_key = 'wp_capabilities'";
In short, the problem I had was that vbbridge wanted to assign this value to the wp_capabilities column in my wp_usermeta table:
a:1:{s:23:"administrator|user role";i:1;}
However, wordpress had been assigning the following value to wp_capabilities in the wp_usermeta table:
a:1:{s:13:"administrator";b:1;}
I'm not sure I understand that whole string. Originally I just tried changing "administrator|user role" to "administrator" but apparently I have to change the s:23 to s:13 too for it to work.
Right now things appear to be working for me (knock on wood), but I'd like to know if this is normal for me to have to make these changes, and if anyone else has experienced this.
I'm guessing if this is an adequate solution, I'll probably need to do the same thing with other user roles as well.
Thanks,
Dustin
|