Notifications
Clear all

Script [Closed] Usergroup php condition

2 Posts
2 Users
0 Reactions
381 Views
Posts: 8
Topic starter
(@blueli)
Active Member
Joined: 2 years ago

Hi. I am trying to redirect specific usergroup members to a specific forum URL. 

I use the function below as a reference, I wonder if there a wpforo usergroup PHP condition I can use?

Something Like if usergroup = 6?

Thanks

 

function custom_login_redirect_page(){

global $user;

  if ( in_array(

    $user->roles[0], array( 'editor')

  )) {

    return home_url( '/community/forum-a );

  }

}

1 Reply
Chris
Posts: 3627
(@chris)
Famed Member
Joined: 3 years ago

Hi @blueli,

I'm sorry but I cannot help you with that, You can contact the Gvectors Custom work team with your request.

Contact email: sales[at]gvectors.com