News:

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

Main Menu

login automation pb using smf_api

Started by tomlelab, November 24, 2008, 12:06:01 PM

Previous topic - Next topic

tomlelab

Hi
I have converted my punbb forum to smf.

I am trying to make a bridge with my website so I am using this function:

$pwd= ("password");
$username=addslashes("test");
if (smf_setLoginCookie(36000, $username,$pwd,false))
{//echo "yes";
smf_authenticateUser();
smf_loadSession();
smf_logOnline();
    print_r($smf_user_info);
    }


It works fine with new users (directly registered through smf), but it doesn't work with converted punbbusers.
It seems pwd from punbb are crypted with sha1.
I tried using sha1 crypting, but it failed too.

Any ideas ?

Thanks


tomlelab

Ok, I read in another topic this:
QuoteA user that exists in the integrated application but not in SMF is attempting to login, so needs to ber migrated to SMF before SMF has a chance to authenticate.  Something to keep in mind here is that SMF can authenticate with many other types of hashes, so the hashed passwords of other systems can typically be written directly to the SMF members table, with the hook returning 'retry', which will automatically invoke SMF to rewrite to its own hash on the second login attempt.

Indeed, after one user manually logs in, the script works fine for the user.
Any chance to convert all old converted pwd ?

Advertisement: