#1016 closed defect (fixed)
Users registered through WordPress get inactive role in bbPress
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 1.0 |
| Component: | Integration | Version: | 1.0-rc-2 |
| Severity: | critical | Keywords: | Registration, Integration |
| Cc: |
Description
This is an issue with WordPress and bbPress integration.
When a new user registers through WordPress, the user is integrated in the database perfectly fine. However, the user is given a role of "inactive" on the bbPress side of things. Instead, the user should be given the role according to the bbPress role map.
I've experienced this issue in bbPress versions 1.0-alpha 2 - alpha 4 and the current trunk version. This also happens using the bbPress/WordPress integration plugin.
Attachments (1)
Change History (7)
With the trunk build (as of now) I get them set as inactive (which is 'correct') but there's still an error.
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/MYDOMAIN/public_html/forums/bb-includes/functions.bb-template.php on line 2009
I've attached an image to explain that one.
I've created a plugin to make a quickfix for this problem. It automatically sets all users without capabilities to members.
function inactive_to_member() {
$userID = bb_get_current_user_info( 'id' );
$user_obj = new BP_User( $userID );
$user = bb_get_user( bb_get_user_id( $userID ) );
if(empty($user->capabilities)) {
$user_obj->set_role('member');
}
}
add_action ('bb_head', 'inactive_to_member', 5, 0);
However, it does not follow the settings in the admin menu for WP integration. It just makes a workaround which might do the trick for a while.
Plugin download (same as the code above).
- Resolution set to fixed
- Status changed from new to closed
I suspect this is related, since when this happens, even them logging in doesn't set them to an active role.
If someone registers via WordPress, all the roles show up (when a Keymaster attempts to edit their profile) as:
Below that, under 'Allow this user to ...' I get this