vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Fields Required when Inserting new Users to database (https://vborg.vbsupport.ru/showthread.php?t=295102)

Zantox 02-13-2013 10:03 PM

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.

kh99 02-13-2013 10:16 PM

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.

Zantox 02-13-2013 10:36 PM

Quote:

Originally Posted by kh99 (Post 2404107)
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'

kh99 02-14-2013 12:21 AM

Quote:

Originally Posted by Zantox (Post 2404108)
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.

Lynne 02-14-2013 12:24 AM

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.

Zantox 02-14-2013 09:42 PM

I read over that article and it didn't seem to be too specific as to what and where things need to be inserted.

Lynne 02-15-2013 02:12 AM

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.

Zantox 02-21-2013 01:18 AM

After reading it over, it looks like the user table usertextfield and userfield.
But I'm not quite sure how to code that form.

Lynne 02-21-2013 02:27 AM

You aren't sure how to code a form? Try here for the basics - http://www.w3schools.com/html/html_forms.asp

Zantox 02-22-2013 12:08 AM

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.


All times are GMT. The time now is 12:53 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.01174 seconds
  • Memory Usage 1,729KB
  • 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
  • (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
  • (10)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