vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Custom Logout Button (https://vborg.vbsupport.ru/showthread.php?t=327476)

doc55 09-26-2019 02:45 PM

Quote:

Originally Posted by Dave (Post 2600789)
Works fine if I do
PHP Code:

$logoutInfo vB_Api::instance('user')->logout($logouthash); 

instead.

Thank you Dave. With that change, The script redirects to the index.php as it is expected and I'm not getting any error messages, but the user is not logged out.

Dave 09-26-2019 03:06 PM

I used the same script on my vBulletin 5 test forum and it logged me out properly. Maybe try clearing your cookies > login again > try the script.

doc55 09-26-2019 04:12 PM

Thank you for your reply.
I just tested it again after clearing the cookies, but still didn't log out the user.
Could this be because I have the option "Remember me" enabled on log-in?

I did var_dump($logoutInfo); and this is what I got:
Code:

array(2) { ["sessionhash"]=> string(32) "78370741ecec09885430016ec4c991fa" ["apiaccesstoken"]=> NULL }
I'm not sure if this would help.


All times are GMT. The time now is 07:45 PM.

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.00954 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete