The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom Logout Button
I want to create a custom logout button for my vB 5.3.3.
I'm using the following code from the core/vb/user.php file but it is not working. Can someone help me troubleshoot this code, please? Thank you PHP Code:
|
#2
|
|||
|
|||
What do you think about the following method to logout users?
Is it OK or does it cause any issues or security concerns? PHP Code:
|
#3
|
|||
|
|||
Use the official vBulletin API. /core/vb/api/user.php has a logout method.
I believe something like: PHP Code:
|
#4
|
|||
|
|||
Thank you Dave for your helpful reply.
Here is the final and functioning code for others, if they need one: PHP Code:
--------------- Added [DATE]1567529927[/DATE] at [TIME]1567529927[/TIME] --------------- Maybe I should ask the question differently. Is it possible to execute the as a function or in the background, instead of redirecting to it as a URL? PHP Code:
|
Благодарность от: | ||
In Omnibus |
#5
|
||||
|
||||
Did you try to call the API user logout?
PHP Code:
|
#6
|
|||
|
|||
Quote:
Here is my code when I use the API: PHP Code:
That action could not be completed. Please try again, and if this occurs again please contact the system administrator and tell them how you got this message. Maybe you could help me find what I'm doing wrong. Thanks again. |
#7
|
|||
|
|||
Anyone could help with this script? I really appreciate anu help I can get.
|
#8
|
|||
|
|||
I'm pretty sure you must put define('CSRF_PROTECTION', false); on top of the file.
|
#9
|
|||
|
|||
Quote:
I tried adding this line on top: PHP Code:
PHP Code:
Here is the my final code so far: PHP Code:
|
#10
|
|||
|
|||
Works fine if I do
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|