#2042 closed defect (bug) (fixed)
bbp_set_current_user_default_role() doesn't seem to be adding default roles to non WP roles added by other plugins
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.2.1 | Priority: | high |
Severity: | normal | Version: | 2.2 |
Component: | API - Roles/Capabilities | Keywords: | has-patch |
Cc: | stephen@… |
Description
This is the behaviour observed for s2member.
See related discussion here -> http://bbpress.org/forums/topic/fix-for-users-of-s2member-and-bbpress-2-2/
I'm "assuming" that this is happening for other membership plugins other than s2member but that's an assumption based on observed behaviour with s2member.
Before making suggestions here, I'll do some more testing to see why the s2member added roles aren't being picked up.
Attachments (1)
Change History (14)
#2
@
13 years ago
- Cc stephen@… added
- Component changed from Users to Roles/Capabilities
Also related discussion: http://www.s2member.com/forums/topic/dont-upgrade-to-bbpress-2-2/
#4
@
13 years ago
I don't like the duplication of code in the patch, but at least it points to what needs to be changed/modified.
#8
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
awesome... like the fix too.
okay the current s2member role IS retrieved via
$bbp->current_user->roles
but there is nothing being done to handle that role if it doesn't match anything in the defaultbbp_get_user_role_map()
. the loop there just checks for roles that match something in the default map.The question is then, how do we handle this? I suggest that we have any other roles detected given the default bbp role. Something like what I'll post in a patch after this comment.