Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: renlok on October 29, 2006, 09:31:23 AM

Title: SMF passwords
Post by: renlok on October 29, 2006, 09:31:23 AM
You know the user passwords are stored as a string on nonsense, how would i got round turning what somone typed as there password to this?

Im trying to make a different login for my SMF board.
Title: Re: SMF passwords
Post by: SleePy on October 29, 2006, 11:29:57 AM
I wouldn't recommend changing the login type used on your smf board.. To much work to do such a thing and would cause current users to not login..

SMF 1.1 uses a sha1 if i remember right..

$sha_passwd = sha1(strtolower($user_settings['memberName']) . $_REQUEST['passwrd']);


SMF 1.0 uses MD5..

Title: Re: SMF passwords
Post by: renlok on October 29, 2006, 03:48:45 PM
well its more like i want to make a login for another site which uses the login details from my SMF database and i use RC3 whats would that use?
Title: Re: SMF passwords
Post by: renlok on October 29, 2006, 04:31:28 PM
i found
$user_settings['passwordSalt'] = substr(md5(rand()), 0, 4);
updateMemberData($ID_MEMBER, array('passwordSalt' => '\'' . $user_settings['passwordSalt'] . '\''));


is that what shanges the password?

my normal code i would use would be is something like $pass = $_POST['pass'] how would i then change ['pass'] to the string thinggy RC3 stores?
Title: Re: SMF passwords
Post by: renlok on October 30, 2006, 05:18:37 AM
 :(
Title: Re: SMF passwords
Post by: kL on October 30, 2006, 07:34:52 AM
Quote from: renlok on October 29, 2006, 04:31:28 PM
i found
$user_settings['passwordSalt'] = substr(md5(rand()), 0, 4);
updateMemberData($ID_MEMBER, array('passwordSalt' => '\'' . $user_settings['passwordSalt'] . '\''));


is that what shanges the password?

my normal code i would use would be is something like $pass = $_POST['pass'] how would i then change ['pass'] to the string thinggy RC3 stores?
you dont want to create your own login file. you can use smfs. just make it redirect to where you want to go to.