atholon Posted August 18, 2008 Share Posted August 18, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/120274-smf-login/ Share on other sites More sharing options...
atholon Posted September 4, 2008 Author Share Posted September 4, 2008 I guess not...that must mean happy hunting for me. Quote Link to comment https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-633858 Share on other sites More sharing options...
Daniel0 Posted September 11, 2008 Share Posted September 11, 2008 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 } Quote Link to comment https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-639294 Share on other sites More sharing options...
new_php85 Posted September 12, 2008 Share Posted September 12, 2008 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* Quote Link to comment https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-639592 Share on other sites More sharing options...
Daniel0 Posted September 12, 2008 Share Posted September 12, 2008 You need to find the correct user. Seeing as login forms usually use the username as mean of identification you would do WHERE memberName = ? Quote Link to comment https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-639694 Share on other sites More sharing options...
CMC Posted September 13, 2008 Share Posted September 13, 2008 Here is the documentation for exactly that. I've integrated my site with SMF and it was very easy. http://docs.simplemachines.org/index.php?topic=789 Quote Link to comment https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-640302 Share on other sites More sharing options...
Daniel0 Posted September 13, 2008 Share Posted September 13, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/120274-smf-login/#findComment-640343 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.