Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 10 years ago

Last modified 9 years ago

#2580 closed defect (bug) (fixed)

Deactivating bbPress does not remove roles

Reported by: netweb's profile netweb Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.5.3
Component: API - Roles/Capabilities Keywords:
Cc:

Description

via http://bbpress.org/forums/topic/uninstalled-bbpress-roles-remain-in-drop-down-list/

Confirmed, when deactivating bbPress, bbPress' roles are not removed and remain in wp_options.wp_user_roles

Change History (8)

#1 @netweb
10 years ago

  • Milestone changed from Awaiting Review to 2.6

#2 @netweb
10 years ago

  • Owner set to johnjamesjacoby

#3 follow-up: @johnjamesjacoby
10 years ago

Interesting. They should never be added there in the first place; not since 2.2.

Calling bbp_remove_roles() will resolve this, though any customizations to those roles will obviously be lost.

We could create a tool that looped through each role in wp_options.wp_user_roles, compares them to default capabilities for each role to determine if any customizations were made, and deletes those without. We could also run this function when remapping forum roles.

What do you think?

#4 in reply to: ↑ 3 @netweb
10 years ago

Replying to johnjamesjacoby:

Interesting. They should never be added there in the first place; not since 2.2.

Calling bbp_remove_roles() will resolve this, though any customizations to those roles will obviously be lost.

Could add back bbp_remove_roles() as it was depreciated in 2.2: /includes/core/capabilities.php#L526

We could create a tool that looped through each role in wp_options.wp_user_roles, compares them to default capabilities for each role to determine if any customizations were made, and deletes those without. We could also run this function when remapping forum roles.

This would only work whilst bbPress is activated, we could move bbp_admin_repair_user_roles() out of the tools.php as part of a new/updated bbp_remove_roles() that is called on bbPress deactivation and/or bbPress tools with required removed/update parameters for each use case.

Also related, when resetting the forums bbp_remove_caps is called and that removes the caps per role but we only remove two of the five bbPress roles, though removing bbp_get_keymaster_role for only doing a reset would cause other issues.

Removed: bbp_get_moderator_role and bbp_get_participant_role
Not Removed: bbp_get_spectator_role, bbp_get_blocked_role and bbp_get_keymaster_role

https://bbpress.trac.wordpress.org/browser/trunk/src/includes/admin/tools.php#L1548

#5 @johnjamesjacoby
10 years ago

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

In 5401:

De-deprecate bbp_remove_roles() and use it in: bbp_admin_reset_handler(), bbp_do_uninstall(), and bbp_version_updater(). Fixes bug where old bbPress role data could still exist in wp_user_roles`. See #2065. Fixes #2580.

#6 @Robkk
10 years ago

some users have said that this is still an issue.

for anyone that wants to remove the user roles of bbPress there is this plugin that will do it.

https://wordpress.org/plugins/bbpress-role-deleter/

install it , activate it , and uninstall it.

This ticket was mentioned in Slack in #bbpress by robkk. View the logs.


9 years ago

This ticket was mentioned in Slack in #bbpress by netweb. View the logs.


9 years ago

Note: See TracTickets for help on using tickets.