bbp_get_user_role_map filter not working
-
Hi, I added a new wordpress role and would like it to map new users not to the participant role but rather to spectator.
So I added this filter in my functions.php.
add_filter('bbp_get_user_role_map', 'assign_spectator_role'); function assign_spectator_role($roles) { $roles['mynewrole'] = bbp_get_spectator_role(); return (array) $roles; }
Problem is that this filter does not get executed.
If I add my role directly in thebbp_get_user_role_map function
it works but not with the filter.
The tools function ‘remap_roles’ also works fine.Any ideas how I can get it to work?
Cheers.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.