$wp_roles = new WP_Roles(); $user->wp_capabilities = $wp_roles->roles[strtolower(get_option('vbb_vbugroup_' . $vbulletin->userinfo[usergroupid]))]['capabilities'];