Jump to content

SMF Login?


atholon

Recommended Posts

  • 3 weeks later...

I wrote something myself when writing the login system for the main site here which uses our SMF database.

 

You can do something like this:

SELECT passwd, is_activated FROM smf_members WHERE memberName = *username_here*;

 

Then you can check if the password matches and if the user is activated (after checking that the user exists of course):

if ($user['is_activated'] != 1) {
    // user is not activated
}
else if (sha1(strtolower($username) . $password) != $user['passwd']) {
    // password doesn't match
}
else {
    // everything is fine
}

Link to comment
https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-639294
Share on other sites

I wrote something myself when writing the login system for the main site here which uses our SMF database.

 

You can do something like this:

SELECT passwd, is_activated FROM smf_members WHERE memberName = *username_here*;

 

Then you can check if the password matches and if the user is activated (after checking that the user exists of course):

if ($user['is_activated'] != 1) {
    // user is not activated
}
else if (sha1(strtolower($username) . $password) != $user['passwd']) {
    // password doesn't match
}
else {
    // everything is fine
}

 

 

 

Hay.... may I know what the purpose for * at your code memberName = *username_here*

Link to comment
https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-639592
Share on other sites

I don't like SMF's SSI.php. I think it's poorly written, it clutters up the global namespace and it messes with the superglobals. In other words, you cannot implement it in your site, your have to implement your site in that. If you decide to move away from SMF at one point and you've based your site around SSI.php then you're screwed.

Link to comment
https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-640343
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.