Skip to:
Content

bbPress.org

Opened 7 years ago

Closed 7 years ago

#1722 closed defect (fixed)

plugin: roles missing after switch_to/restore blog

Reported by: MrMaz Owned by:
Milestone: 2.1 Priority: normal
Severity: normal Version: 2.0
Component: Component - Users Keywords:
Cc:

Description

AFAIK this only applies to the plugin version.

Since switch_to_blog() reloads user roles to match the new blog id, and reverts them on restore_current_blog(), the special bbPress role masks are not re-applied.

I fixed this in my app by running bbp_global_access_role_mask() manually, although I'm not sure if there are other role setup items that should be run as well.

It might be a good idea to hook the role mask functionality into 'switch_blog' in addition to the initialization routine.

Change History (3)

#1 @johnjamesjacoby
7 years ago

  • Component changed from Back-end to Users
  • Milestone changed from Awaiting Review to 2.1

Most likely related to #1693.

#2 @johnjamesjacoby
7 years ago

(In [3689]) Move 'bbp_setup_current_user' action off of 'bbp_init' and onto 'set_current_user.' See #1722.

#3 @johnjamesjacoby
7 years ago

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

r3689 fixes one part of the problem. The other is definitely part of #1693. Closing this one as fixed as it handles bbp_global_access_role_mask() specifically.

Note: See TracTickets for help on using tickets.