Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: JamesNorman on October 02, 2008, 09:40:20 AM

Title: Manually Add Members
Post by: JamesNorman on October 02, 2008, 09:40:20 AM
Hi,

I am currently building a new site and am also running SMF 1.1.4 along side it. My aim is to integrate my site and the forum by when the user signs up at my site i can insert data in the forum database at the same time. After looking at the database structure of SMF, there a few questions i would like someone to answer before i attempt to integrate my site and the forum:
1) Apart from the "members" table, are there any other tables that i will need to input the users data into?
2) What form of encryption is in use for the password field in the members table?

Thanks

James N
Title: Re: Manually Add Members
Post by: Nathaniel on October 02, 2008, 09:47:36 AM
1) You don't actually need to add things to the database yourself. You can use the 'registerMember()' function from the 'Subs-Members.php' file to do it. Below is an example of how you can use that function.
http://www.simplemachines.org/community/index.php?topic=260267.0

Remember that you will have to include the 'SSI.php' and 'Subs-Members.php' files before you called the 'registerMember' function.

2) SMF uses sha1 along with a salt of the username.

You can use this code to encrypt the password:
sha1(strtolower($username) . $password);
Title: Re: Manually Add Members
Post by: JamesNorman on October 02, 2008, 09:55:12 AM
Thanks ever so much for your speedy response!

James N