AI Assistant
Notifications
Clear all

[Closed] Usergroup php condition

2 Posts
2 Users
0 Reactions
912 Views
Posts: 8
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@blueli)
Active Member
Joined: 3 years ago
[#34364]

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: 3610
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@chris)
Famed Member
Joined: 5 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


Share: