Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Mike Bobbitt on September 26, 2017, 06:14:39 AM

Title: Verifying password hash
Post by: Mike Bobbitt on September 26, 2017, 06:14:39 AM
Upgraded a test forum to the nightly build this morning, and everything looks great.

However, I use an external script to authenticate board users and regulate access to non-SMF areas. (So you can't access some pages unless you are logged in.) In this script, I read the username/password from the local cookie, and compare it against the db password hash for that user using the good old SHA1 hashing:

$passhash = sha1(strtolower($username) . $password);

I'm not sure what mechanism is in use under 2.1, but am looking for the equivalent process.


Thanks!
Mike
Title: Re: Verifying password hash
Post by: Arantor on September 26, 2017, 06:24:33 AM
Because including SSI.php and having SMF entirely do it for you isn't an option?
Title: Re: Verifying password hash
Post by: Mike Bobbitt on September 26, 2017, 06:50:34 AM
Good point, I will now simply check $context['user']['is_logged'] for the user's authentication status. Thanks.