Skip to:
Content

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#1016 closed defect (fixed)

Users registered through WordPress get inactive role in bbPress

Reported by: greenshady Owned by:
Milestone: 1.0 Priority: high
Severity: critical Version: 1.0-rc-2
Component: Integration 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)

Picture 1.png (26.9 KB) - added by ipstenu 5 years ago.
New error with SVN as of 12-21-2008 @ 12 noon ET

Download all attachments as: .zip

Change History (7)

comment:1 ipstenu5 years ago

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:

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /domain.com/forums/bb-includes/functions.bb-template.php on line 2021

Below that, under 'Allow this user to ...' I get this

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/jorjafox/public_html/forums/bb-includes/functions.bb-template.php on line 2036

comment:2 ipstenu5 years ago

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.

ipstenu5 years ago

New error with SVN as of 12-21-2008 @ 12 noon ET

comment:3 svennid5 years ago

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).

comment:4 sambauers5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [1900]) Fixes #1016

comment:5 anonymous5 years ago

  • Milestone 1.0-beta deleted

Milestone 1.0-beta deleted

comment:6 sambauers5 years ago

  • Milestone set to 1.0
Note: See TracTickets for help on using tickets.