#2580 closed defect (bug) (fixed)
Deactivating bbPress does not remove roles
Reported by: | netweb | Owned by: | 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)
#4
in reply to:
↑ 3
@
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
#6
@
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.
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?