Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 08-23-2007, 05:42 PM
dzineit dzineit is offline
 
Join Date: Aug 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is how I fixed the problem.

Ill try to show tidbits, because it is integrated with some other site im doing.

Ignore MID in the sql code, thats something I added to th Vbulletin database.

$license = your license number
the $salt I hard coded sicne I am the one adding users to the database. So I know the salt.

Code:
function logintoforum($userid, $pass_plaintext, $salt, $license){

$SQLCODE[0] = "SELECT * FROM `user` WHERE `mid` = '$userid'";
$QRYCODE[0] = mysql_query($SQLCODE[0]) or die(mysql_error());
$ASSCODE[0] = mysql_fetch_assoc($QRYCODE[0]);

$password = md5(md5(md5($pass_plaintext) . $salt) . $license); 

setcookie('bbpassword', $password, time() + 14400);
setcookie('bbuserid', $ASSCODE[0]['userid'], time() + 14400);
}

Are you still trying to register the user with an external script into Vbulletin?
Reply With Quote
  #12  
Old 08-23-2007, 06:16 PM
Norco Norco is offline
 
Join Date: Jun 2007
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right now, I have it so it sets the cookies (I checked in my browser). But it is on a different domain then my forum so I am unsure if it will work until I transfer everything over to the domain the forum is on.
Reply With Quote
  #13  
Old 08-24-2007, 06:03 AM
treelovinhippie treelovinhippie is offline
 
Join Date: Jul 2007
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome... all I need to know now is how to log the user OUT externally. Ideas?

Is it just clear the two created cookies and then clear the session in the database? (how do you do that with the sessions?)

Edit: removing the userid, password and sessionhash cookies worked... ie:

setcookie('bbpassword', "", time() - 14400);
setcookie('bbuserid', "", time() - 14400);
setcookie('bbsessionhash', "", time() - 14400);

Although yeah it still doesn't remove the session data from the database
Reply With Quote
  #14  
Old 08-24-2007, 03:18 PM
dzineit dzineit is offline
 
Join Date: Aug 2007
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well,

I don't see V bulletin doing this either.

I just clear the cookies and that works well enough for me.

Its really sad that Vbulletin has no better support. PHPbb has better response and its free. Unbelievable.

Tree, cookies are not held to one server, and they can work cross domains. Sessions cannot since they are saved on the server. Cookies are stored on the clients computer.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:14 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04175 seconds
  • Memory Usage 2,191KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete