Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 13 Feb 2013, 22:03
Zantox Zantox is offline
 
Join Date: Nov 2012
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 13 Feb 2013, 22:16
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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 13 Feb 2013, 22:36
Zantox Zantox is offline
 
Join Date: Nov 2012
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 14 Feb 2013, 00:21
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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.

Last edited by kh99; 14 Feb 2013 at 00:35.
Reply With Quote
  #5  
Old 14 Feb 2013, 00:24
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #6  
Old 14 Feb 2013, 21:42
Zantox Zantox is offline
 
Join Date: Nov 2012
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 15 Feb 2013, 02:12
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
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.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #8  
Old 21 Feb 2013, 01:18
Zantox Zantox is offline
 
Join Date: Nov 2012
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 21 Feb 2013, 02:27
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You aren't sure how to code a form? Try here for the basics - http://www.w3schools.com/html/html_forms.asp
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #10  
Old 22 Feb 2013, 00:08
Zantox Zantox is offline
 
Join Date: Nov 2012
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
  #11  
Old 22 Feb 2013, 00:55
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Real name: Lynne
You could take a look at the file I already pointed you to since it adds the information into the database. Do you code php at all? If not, you may want to hire someone to do what you want.
__________________
Former vBulletin.org Staff Member

Try a search before posting for help. Many users won't, and don't, help if the question has been answered several times before.
W3Schools -
Online vBulletin Manual
If I post some CSS and don't say where it goes, put it in the additional.css template.
I will NOT help via PM (you will be directed to post in the forums for help.)
Reply With Quote
  #12  
Old 22 Feb 2013, 02:18
Zantox Zantox is offline
 
Join Date: Nov 2012
A little, php was never my focus. If I had the funding to hire someone, I would :P
I can look around some more.
Reply With Quote
  #13  
Old 22 Feb 2013, 12:16
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
If you're not including any vb code in the app you're creating, then you can use whatever language you want (you said it's an existing global registration system, so I guess it's been decided). If you are using php then you can use the mysql_query() function to do an insert to the user table, and don't specify a value for userid (or specify NULL). Then call mysql_insert_id() to get the userid created by the insert, and use that value as the userid when you insert rows in the userfield and usertextfield tables.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Force users to complete new required fields Locutus2999 vBulletin 2.x Beta Releases 3 09 Feb 2004 10:39



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 22:49.

Layout Options | Width: Wide Color: