vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Logout issue, non VB page (https://vborg.vbsupport.ru/showthread.php?t=198492)

Kihon Kata 12-10-2008 12:49 AM

Logout issue, non VB page
 
Hello. I am not much of a phpcoder and my original coder is not around, but currently on this page here, I am using this code to logout. It takes like 3-4 clicks to logout.
Code:

<a href="javascript:document.frmlog.logout.value='Log Out';document.frmlog.submit();">Log Out?</a>
By searching and reading here, I found that this code works on most sites, but this won't work on my site:
Code:

<a href="login.php?do=logout&logouthash=$bbuserinfo[logouthash]">Logout</a
We do track the userid and usernames, but how can I get the logout to work better?

If this helps, this code displays the username
Code:

<?
echo $username
?>

Thanks for the help!

Dismounted 12-10-2008 02:58 AM

The logout hash is the same value as the security token (in vBulletin 3.7+).

Kihon Kata 12-10-2008 05:49 AM

Quote:

Originally Posted by Dismounted (Post 1682073)
The logout hash is the same value as the security token (in vBulletin 3.7+).

Ok..thanks for the reply

So, what do I exactly do?

Dismounted 12-10-2008 07:14 AM

Put the security token in the link - you can generate one using this algorithm:
PHP Code:

$securitytoken time() . '-' sha1(time() . sha1($userid sha1($salt) . sha1($licenseid))); 


Kihon Kata 12-10-2008 01:22 PM

Quote:

Originally Posted by Dismounted (Post 1682178)
Put the security token in the link - you can generate one using this algorithm:
PHP Code:

$securitytoken time() . '-' sha1(time() . sha1($userid sha1($salt) . sha1($licenseid))); 


Thanks for the reply. Can I ask you to show me exactly how I should format it based on my info that I posted? Sorry(and thanks).

--------------- Added [DATE]1228960005[/DATE] at [TIME]1228960005[/TIME] ---------------

EDIT:

fixed


All times are GMT. The time now is 05:00 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01135 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete