Jump to content

SMF Login?


atholon

Recommended Posts

Anyone know of a good mod that allows external logins like integrating the SMF login with a main site? I have one that we made for Invision but I am not sure I want to hunt through all of the SMF code if their's already a script that does what I need.

Link to comment
Share on other sites

  • 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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.