Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2013, 10:03 PM
Zantox Zantox is offline
 
Join Date: Nov 2012
Location: USA
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Fields Required when Inserting new Users to database

Hello,

I've created my own global registration system, that registers to other services I offer, such as Mantis Bug Tracker.
I'm curious as to what fields need to be inserted to have a new user show up and what tables.
I assumed it was the 'user' table, and inserted a 'username' 'email' and 'password' but it didn't seem to work.
I feel like it needs to be inserted into other places as well?

Please Advise.
Reply With Quote
  #2  
Old 02-13-2013, 10:16 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know there should be a row in userfield and usertextfield (with matching userids of course), but I'm not sure if that's all you need.
Reply With Quote
  #3  
Old 02-13-2013, 10:36 PM
Zantox Zantox is offline
 
Join Date: Nov 2012
Location: USA
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I know there should be a row in userfield and usertextfield (with matching userids of course), but I'm not sure if that's all you need.
Well the table user also seems to be quite relevant. It contains the user data such as 'username' and 'password'
Reply With Quote
  #4  
Old 02-14-2013, 12:21 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zantox View Post
Well the table user also seems to be quite relevant. It contains the user data such as 'username' and 'password'
Yeah, sorry, I meant those other two in addition to the user table. You should insert a row into user, then get the userid of the inserted row and use it to insert rows into userfield and usertextfield. But like you said, the important information is in the user table so I'm not sure how important those others are (although I don't think the user shows up in the admincp if there aren't records in the other tables).

If you were using vbulletin code you could use the datamanager to add a user. Even if you aren't, you could look at includes/class_dm_user and see what it's doing.

Edit: And after reading Lynne's response below I realize that I was kind of assuming that you set all the important fields in the user table, but maybe that was your question - it could be that you didn't set something that's needed. I'm not sure which article Lynne means, but I found this one: www.vbulletin.org/forum/showthread.php?t=82836 It talks about using the datamanager, but it also has a list of fields with descriptions. And the example seems to say that you need username, email, password, and usergroupid at a minimum.
Reply With Quote
  #5  
Old 02-14-2013, 12:24 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is an article (although it is in the vb3 article forum) that outlines the information needed to be input into the database when a user is registered. It's an article about creating users. So, take a look at that and see what is there. You can also look at the registration.php file and see what is needed.
Reply With Quote
  #6  
Old 02-14-2013, 09:42 PM
Zantox Zantox is offline
 
Join Date: Nov 2012
Location: USA
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I read over that article and it didn't seem to be too specific as to what and where things need to be inserted.
Reply With Quote
  #7  
Old 02-15-2013, 02:12 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perhaps a better place for you to look is this page admincp/user.php?do=add . That is the page called when you want to add a user via the admincp.
Reply With Quote
  #8  
Old 02-21-2013, 01:18 AM
Zantox Zantox is offline
 
Join Date: Nov 2012
Location: USA
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

After reading it over, it looks like the user table usertextfield and userfield.
But I'm not quite sure how to code that form.
Reply With Quote
  #9  
Old 02-21-2013, 02:27 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You aren't sure how to code a form? Try here for the basics - http://www.w3schools.com/html/html_forms.asp
Reply With Quote
  #10  
Old 02-22-2013, 12:08 AM
Zantox Zantox is offline
 
Join Date: Nov 2012
Location: USA
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No I know how I'm going to do the form.
I'm talking about the php for inserting the fields and how to make it insert corresponding userid's in numerous tables.
Reply With Quote
Reply

Thread Tools
Display Modes

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 07:33 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.04586 seconds
  • Memory Usage 2,243KB
  • Queries Executed 11 (?)
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
  • (2)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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