Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Remote Login

Aloittaja redwall_hp, huhtikuu 27, 2007, 12:33:29 IP

« edellinen - seuraava »

redwall_hp

My site is being powered by a custom PHP login script. I'm trying to get everything set up so if a user logs in with mylogin.php, mylogin.php will log them in on SMF too. I've been trying to use the SMF API to do it, but I can't get it to work.

Here are the lines I'm using:
include "smf_api.php";
smf_setLoginCookie(3600,addslashes($username),$md5password,false);
smf_authenticateUser();

IT's setting a cookie all right, but SMF is ignoring it.

redwall_hp

My idea on how to implement it:
How can you do this?

Once SMF loads, check to see if my cusom login's cookies are set. If they are, bounce over to the SMF login2() function (passing the user name and password). Then login2() would send them back to the forum index. So if they're logged in to my login script and they visit the forum, the forum will login. Is this possible?

Advertisement: