Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function i4w_authenticated_remote_login_action($user, $contact) {
- global $SESSION;
- IF ($arrTAGS = explode(',', $SESSION['i4wuser']['Groups'])) :
- IF (in_array(38181, $arrTAGS) || in_array(38185, $arrTAGS) || in_array(38193, $arrTAGS)) :
- echo $user_id = get_current_user_id();
- $new_role_forum_role="bbp_participant";
- echo bbp_set_user_role( $user_id, $new_role_forum_role );
- exit();
- ELSEIF (in_array(38177, $arrTAGS) || in_array(38195, $arrTAGS) || in_array(38183, $arrTAGS) || in_array(38187, $arrTAGS) || in_array(38189, $arrTAGS)) :
- $user_id = get_current_user_id();
- $new_role_forum_role=โbbp_spectatorโ;
- bbp_set_user_role( $user_id, $new_role_forum_role );
- ENDIF;
- ENDIF;
- }
- add_filter('i4w_authenticated_remote_login', 'i4w_authenticated_remote_login_action', 1, 2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement