AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Login Redirect

3 Posts
3 Users
0 Reactions
1,423 Views
Posts: 1
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
(@sguillaume)
New Member
Joined: 7 years ago
[#8976]

Thanks for the wonderful plugin. It works great. I have a general question about the email sent from wpForo. I setup the forums for registered users only. This works great. The question is

1). The email that is sent has the link -> www.example.com/community/$topic['topicurl']

2). When a user that receives this email and clicks the link - 

  • if the user is logged in already - everything works fine - they go right to the topic
  • if the user is NOT logged in - they get the 404 page - saying that the page does not exist

3). My question is 

  • In wordpress or wpForo - is there a hook, filter that will allow me to check to see if the user is logged in - something like:

if (page == /community/)

if (!is_user_logged_in()

wp_redirect('example.com/login/')

  • then after the redirect - the user will go the the requested forum url
Any help would be great!

Thanks

2 Replies
VereK
Posts: 522
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
(@verek)
Honorable Member
Joined: 8 years ago

@sguillaume,

Basically you have forums where view permissions are denied to guests/not logged in members. IIRC Wpforo sessions expire after 7? days even if the "remember me" button is checked at login. After complaints from my members about this I installed this plugin: https://wordpress.org/plugins/wp-persistent-login/ ,it works really well with decent controls for member and admin alike.


Sofy
Posts: 5777
 Sofy
Admin
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
(@sofy)
Support Team
Joined: 8 years ago

Hi @sguillaume, @verek,

We're going to add a new feature that will redirect to the login page when the topic is private or not available for the current user.

This feature will be available in the next version release (no ETA).


Share: