Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 04-06-2013, 12:54 AM
gtfreymann gtfreymann is offline
 
Join Date: Feb 2013
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by frankgeraci View Post
I am also pretty interested in this. I initially saw the vbsso plugin, but it will not work with vb 5. I also have a site that handles registration and would like users to automatically have a forum account.
I never heard back from that other fellow after I emailed him my scripts but like my message says. Pm me with your email address and I'll send you what I have.
Reply With Quote
  #12  
Old 04-06-2013, 05:10 PM
fungku's Avatar
fungku fungku is offline
 
Join Date: Jan 2011
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the scripts. they are good. however, i haven't had time to set up my forum yet and now I'm thinking of waiting for fluxxBB 2.0 or making my own. disappointed with the direction of VB lately since vb5 came out and started thinking maybe the earlier I jump off the sinking ship the better. :P
Reply With Quote
  #13  
Old 04-12-2013, 01:21 PM
nathan-mahdavi nathan-mahdavi is offline
 
Join Date: Apr 2013
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a working script (tested on VB 5.0.1) that will create a random user and then log them in using their ID. If you already know a users ID then you can just log them in using the log_user_in function.

PHP Code:
<?php

chdir
("forum/core/"); // change to your core folder location
require_once("global.php");

function 
create_random_user(){
    
$dataman =& datamanager_init('User'$vbulletin);  
    
$dataman->set('username'"user".rand());
    
$dataman->set('email'rand()."@domain.com");
    
$dataman->set('password'"leighf");
    return 
$dataman->save();
}

function 
log_user_in($userid){
    
$user fetch_userinfo($userid);
    
$auth vB_User::verifyAuthentication($user['username'], "leighf"$user['password'], $user['password']);
    
$res vB_User::processNewLogin($auth);
    
vbsetcookie('userid'$res['userid']); 
    
vbsetcookie('password'$res['password']);
    
vbsetcookie('sessionhash'$res['sessionhash']);
}

// create random user
$userid create_random_user();

// log them in
log_user_in($userid);
It's a script in its simplest of states. The usernames password is hardcoded but assuming you know what's going on in the above snippet, you'll be fine adding this yourself.
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 10:49 AM.


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.03688 seconds
  • Memory Usage 2,196KB
  • 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_php
  • (1)bbcode_quote
  • (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
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)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