vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Redirect after LOGIN from custom page (https://vborg.vbsupport.ru/showthread.php?t=287310)

stryka 08-31-2012 02:22 PM

Redirect after LOGIN from custom page
 
I have a custom PHP page that checks to see if user is logged in before they can perform a function.

If not logged in the login windows appears in an overlay window

Then the user logs in BUT... they are redirected to their control panel

What do i have to send the LOGIN form so it remember to redirect back to the custom page that was requesting the login details?

Max Taxable 08-31-2012 02:26 PM

Quote:

checks to see if user is logged in before they can perform a function.
Didn't vBulletin give you that with the Security Token hash, starting around version 3.7? What version do you have?

I don't understand the need for this extra verification.

stryka 08-31-2012 06:55 PM

i am using vb3.8...

Sorry i am not the actual programmer for the custom page... what token should the custom PHP page have in order to send the proper information to the login form so it redirects?



Quote:

Originally Posted by Max Taxable (Post 2361489)
Didn't vBulletin give you that with the Security Token hash, starting around version 3.7? What version do you have?

I don't understand the need for this extra verification.


Max Taxable 08-31-2012 07:10 PM

It sounds like the "custom page" is superfluous, unnecessary.. I still don't understand why it is necessary.

kh99 09-01-2012 09:45 AM

Is your custom page in the same directory as your forum (where global.php is)? If so, you should be able to call print_no_permission() if they aren't logged in and it should redirect back to your custom page after login. For instance, this test program works:

Code:

<?php
include('./global.php');

if ($vbulletin->userinfo['userid'] == 0)
{
    print_no_permission();
}
else
    echo "Hello " . $vbulletin->userinfo['username'];



All times are GMT. The time now is 04:15 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.01922 seconds
  • Memory Usage 1,718KB
  • 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
  • (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