Notifications
Clear all

[Closed] Change the destination where where user is sent upon logout

10 Posts
6 Users
1 Reactions
4,664 Views
Posts: 17
Topic starter
(@bba01)
Eminent Member
Joined: 7 years ago

Hey guys!

Thank you for a great plugin! How do I change the above mentioned destination? I want my users to be redirected to a custom made you have been logged out page.

With best regards,

bb

9 Replies
Robert
Posts: 10529
Admin
(@robert)
Support Team
Joined: 8 years ago

I the target page is a forum page you can change the menu to the target page and add /?wpforo=logout after URL. For example:

 https://wpforo.com/community/members /?wpforo=logout

If the target page is not a forum page you should change it in core. but it's not a update safe way:

Find this line in /wpforo/wpforo.php file:

wp_redirect( wpforo_home_url( preg_replace('#\?.*$#is', '', wpforo_get_request_uri()) ) );

Change to this:

wp_redirect( wpforo_home_url( preg_replace('#\?.*$#is', '', 'http://example.com/target-page/') ) );

 

Posts: 17
Topic starter
(@bba01)
Eminent Member
Joined: 7 years ago

Hi Robert and thank you!

Maybe in the future you can add a feature in where the user can choose where to redirect the logout?

/b

Robert
Posts: 10529
Admin
(@robert)
Support Team
Joined: 8 years ago

Thank you bba01,  we'll take this under consideration.

Posts: 23
(@pederw)
Eminent Member
Joined: 6 years ago

I really would like this feuture as well. been playing out with different scripts for a day now and it just mess upp login/logout process. Know you got a lot of requests of features but this one would be quite easy to fix? (me just guessing actually) since you have the solution above.

Page 1 / 2