vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Intercepting vB login (https://vborg.vbsupport.ru/showthread.php?t=102742)

t0ny 12-11-2005 07:06 PM

Intercepting vB login
 
Is there a way I can intercept a successful login; so that before the redirecting screen i can quickly pop to another page and then carry on to the redirect screen??

merk 12-11-2005 08:56 PM

Do you just want it when they login, or when someone with cookies visits your site and is "automatically" logged in? (I currently have a plugin that notifies me when anyone logs into admincp or modcp, works really well)

t0ny 12-11-2005 09:08 PM

Hi,

What i want to acheive is that when someone logs into the forum it sets an ASP session variable so my main site knows someone has logged in too.

The only way i thought this was possible, was before the redirection screen is displayed, fire an asp page off, then fire the redirection page ????

but sorry YES, i want it for when someone is automatically logged in too!

merk 12-11-2005 09:31 PM

If your asp page is in the same domain and your cookie path/domain is set properly you wont need to do what you're suggesting, however I strongly suggest you reconsider using ASP for extensions unless you know what you're doing.

t0ny 12-11-2005 09:37 PM

Yes it is in the same domain and I can see the cookies from within my ASP page, does the glbals include set the sessions if it finds the cookies?

The whole main site is in ASP, and I only have until the 16th to get this done; so I can't rewrite it in PHP, besides i am not too hot on PHP either..

Just need to make my ASP app aware that a login has occured, I thought i had sussed it with a hidden iFrame, but obviously this renders after the main page which is too late...

I am going to Fail!!!!!

merk 12-11-2005 09:51 PM

There should be a cookie called <cookieprefix>session, or the like containing a sessionhash that you can match to the vbulletin session table.

No need to touch php.

t0ny 12-11-2005 09:55 PM

Oh, so there is a cookie that will tell me the session details, ie login id etc?

What happens if someone has cookies disabled or no remember me ticked? Can vBulletin work without cookies?

merk 12-11-2005 10:09 PM

If the browser doesnt have cookies enabled you're up shit creek (no paddle) unless you want to start messing with sessionhashes on the url (which ive never looked at), the only thing the cookie will tell you is a sessionhash - youll need to query it from the db and compare the password (in another cookie) against the user database.

t0ny 12-11-2005 10:19 PM

ahh, does vB work with cookies off? i guess it only has to look at its session variables...

So the only way i am going to be able to tell if someone is logged in from ASP is to check that cookie?

merk 12-11-2005 10:31 PM

vbulletin works fine without cookies, its your script that will break if they are disabled because its not possible for you to know if someone is logged in or not unless vbulletin passes a session hash back to your pages. I dont suspect they will visit the forums before the main site. (That and intergrating a seperate sessionhash into your site is a big job, every url needs to pass one).


All times are GMT. The time now is 12:54 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.01014 seconds
  • Memory Usage 1,723KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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