Announcement

Collapse
No announcement yet.

Redirect after Custom PHP Logout

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Redirect after Custom PHP Logout

    I'm using a custom php script to logout users from vBulletin.
    Here is my script which is working as expected:

    PHP Code:
    //Init the vBulletin system
    require_once( '/forum/includes/vb5/autoloader.php' );
    vB5_Autoloader::register'/forum' );
    vB5_Frontend_Application::init'config.php' );

    //Get user info
    $vb_userInfo vB_Api::instance'user' )->fetchUserinfo();

    //Log out URL
    $logout_url '/forum/auth/logout?logouthash=' $vb_userInfo'logouthash'];
    header"Location: $logout_url); 

    Because I'm using header() function to load the logout URL, the user gets redirected to forum home page after being logged out which is a subdirectory of my site.
    What I'm trying to do is to redirect the user to the home page after successful logout.
    I did try to use curl for this purpose, but that didn't work either.
    Any suggestions on how to do so?

Users Viewing This Page

Collapse

There is 1 user viewing this forum topic.

  • Guest Guest

Latest Posts

Collapse

Working...
X
Searching...Please wait.
An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

Please push the back button and reload the previous window.'
An unexpected error was returned: 'Your submission could not be processed because the token has expired.

Please push the back button and reload the previous window.'
An internal error has occurred and the module cannot be displayed.
There are no results that meet this criteria.
Search Result for "|||"