vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Session Hash (https://vborg.vbsupport.ru/showthread.php?t=162203)

shiznatix 11-08-2007 09:50 AM

Session Hash
 
Hello,

My installation of VB is not the main part of my website and I so I have many "hooks" into it to keep everything running smooth. Right now what I am trying to do is create my own registration page.

This is all setup and I have everything being saved to the database perfectly. Now the problem I am getting is when the user confirms their email address, I am trying to auto-login the users.

What is happening is that I am trying to create the session for VB and put it into the "session" table. Everything seams to be correct except the variable "sessionhash". I am trying to get that one to be correct but am unable to do it and thus the session that I create ends up being invalid and not used.

The code that I have been using is:
PHP Code:

$session_id_hash md5($_SERVER['HTTP_USER_AGENT'].implode('.'array_slice(explode('.'$_SERVER['REMOTE_ADDR']), 03)));
$session_hash md5(time().'/poker-forum/login.php?do=login&do=login'.$session_id_hash.$_SERVER['REMOTE_ADDR'].rand(11000000)); 

But for some reason I can not get the session_hash to be used by vbulletin. I tried to find where VB creates the sessionhash variable so I opened includes/class_core.php and went to the function fetch_sessionhash() and I tried to duplicate it in my $session_hash variable from above but it does not work.

So, how can I get this session hash variable? I need to be able to automatically log users in when they confirm their email and this is the only thing that is keeping me from doing so.

Thanks.


All times are GMT. The time now is 08:13 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,714KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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