Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: Faberz - maaliskuu 09, 2005, 12:32:59 AP

Otsikko: Intergration with another script
Kirjoitti: Faberz - maaliskuu 09, 2005, 12:32:59 AP
Currently i have a script that lets user register to my site for special accounts, i want to make it so that users are added to smf once they have registered for my site, liek if they decide to join for those accounts they automaticaly make an account on the smf. Basically i want to know what php or mySql i need to insert to the database in order for the user to be added. I really need to find a way to get this to work in order to use SMF thank you. I really like smf congrats on al the hard work. :D :D
Otsikko: Re: Intergration with another script
Kirjoitti: [Unknown] - maaliskuu 09, 2005, 04:39:56 AP
How comfortable are you with PHP and MySQL?

A more fine tuned and simplified registration part of the smf_api.php script is still being written, but it's not hard to do it "manually" (so to speak) outside that.  Essentially, you need to add a row to the members table, and it NEEDS to have the following columns set:

realName
memberName
emailAddress
passwd

For simplicity's sake, passwd can be set to simply the MD5 hash of the password.  This would be like so with MySQL

MD5('password')

Which can be used in VALUES under an INSERT.

-[Unknown]
Otsikko: Re: Intergration with another script
Kirjoitti: Faberz - maaliskuu 09, 2005, 06:27:40 AP
Well im doing it through a script so im just adding it to my current script. Something like a function that tells it to add the users to my database and the forums database, i guess it can be done through the script with a couple of inserts