vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Inserting a new user into multiple tables. (https://vborg.vbsupport.ru/showthread.php?t=72159)

Radon3k 11-30-2004 08:22 PM

Quote:

Originally Posted by rake
yeah. doing it through vbulletin would be much easier. check for the query that inserts the info in the user table (look for something like $userid = $DB_site->insert_id(); ) and then switch databases and insert the stuff you need into your site database. don't forget to switch back to the vbulletin database after that.

I understand it would be easier doing it through vBulletin but to be honest I really don't want to. I would think I could just copy and paste the necessary information to my register file and link it to the vBulletin database but I'm curious as to which files I would have to include in order to do that. Any ideas?

Radon3k 12-01-2004 07:48 PM

Quote:

Originally Posted by Radon3k
I understand it would be easier doing it through vBulletin but to be honest I really don't want to. I would think I could just copy and paste the necessary information to my register file and link it to the vBulletin database but I'm curious as to which files I would have to include in order to do that. Any ideas?

I would think for some of the more experienced hackers this would be very easy. I've tried messing about with this and I'm not having much luck and I would really appreciate some help. Thanks.

psalzmann 07-05-2007 02:57 AM

Not that it helps, but try this:

1. install vb fresh, locally
2. register in your fresh vb as a new user
3. monitor the tables

Questions:
1. What table(s) was populated?
2. Anything needing done to usergroups?
3. Anything else noticable?

I would start there. You can then do it manually once you know what vb requires as a new user. I do think you'll need to have the password for the vb user manually salted and hashed while adding to the vb user table. The email address for that vb user can be associated with your user table in your other app. That could be the common key here.

This can actually be approached in many ways but if I was to do this right now, I'd spend 10 minutes installing fresh and doing that I've mentioned above just to be safe .. if you are not fully understanding the vb datastorage methods and coding.

Peter

Eikinskjaldi 07-05-2007 04:08 AM

I haven't done this for user, but basically what you want is the user datamanager

your code will look *something* like this
PHP Code:

require_once('includes/functions.php');
$userdm datamanager_init("User");
$userdm->do_set('username'$username);
$userdm->do_set('email'$email);
//heaps more stuff here
$userdm->save(); 

have a look at includes/class_dm_user.php, and note that some of the required params are bitfields, and will need to be set with set_bitfield.

Its not trivial.


All times are GMT. The time now is 09:00 AM.

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.01191 seconds
  • Memory Usage 1,727KB
  • 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
  • (2)bbcode_quote_printable
  • (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
  • (4)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