XHanch Studio Log in | Register | Cart

Forum

[How to] get the VB...
 
Notifications
Clear all

[How to] get the VBulletin logout link programmatically

1 Posts
1 Users
0 Likes
1,587 Views
XHanch
(@xhanch-alt)
Posts: 2105
Member Admin
Topic starter
 

In Vbulletin, the logout hash is loaded into the global userinfo array, so it's available to you when you've included the global.php file.
A very basic example of creating a page with just the logout link might look like this (assuming your script is in the vBulletin directory):

<?php
    include('./global.php');
    if($vbulletin->userinfo['userid'] > 0)
        echo '<a href=""login.php?'" . $session[sessionurl] . 'do=logout&amp;logouthash=' . $vbulletin->userinfo['logouthash'] . '">Logout</a>';
?>

 
Posted : 30/04/2012 10:36 pm
Share:

× Close Menu