Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Remaker - tammikuu 03, 2006, 03:52:33 AP

Otsikko: passwordSalt field in smf_members ?
Kirjoitti: Remaker - tammikuu 03, 2006, 03:52:33 AP
Hey, I was wondering what is the passwordSalt field? What is used for?

Also, I am creating user accounts using a php script and this is the query I use...


'insert into current_smf1.smf_members (memberName,dateRegistered,realName,passwd,emailAddress,signature) values ("'.$newuser[0].'","'.date("U").'","'.$newuser[3].'","'.md5($newuser[1]).'","'.$newuser[2].'","A happy wallpaperbox user.")'


Is this ok? Are all the required fields in the query?
Otsikko: Re: passwordSalt field in smf_members ?
Kirjoitti: Elissen - tammikuu 03, 2006, 06:10:43 AP
In SMF 1.1, SHA is used to encrypt the password instead of a MD5-hash. Take a look in I think Load.php to see how passwords are handled.
Otsikko: Re: passwordSalt field in smf_members ?
Kirjoitti: Remaker - tammikuu 04, 2006, 04:03:33 AP
Lainaus käyttäjältä: Elissen - tammikuu 03, 2006, 06:10:43 AP
In SMF 1.1, SHA is used to encrypt the password instead of a MD5-hash. Take a look in I think Load.php to see how passwords are handled.

Well, when I am creating users, I am using md5($password) to hash the password and add it to the database, and it seems if I let the passwordSalt field empty, the users are still able to login, so I let thinks work this way :D
Otsikko: Re: passwordSalt field in smf_members ?
Kirjoitti: Grudge - tammikuu 04, 2006, 06:15:52 AP
Yes, SMF auto updates md5 hashing to the new system.