News:

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

Main Menu

New users needing to log in 3 times after user importing..

Started by abda53, October 30, 2010, 07:13:38 AM

Previous topic - Next topic

abda53

I have a custom site with users and a database, and also SMF..

After the user verifies their account, it will also add the user to the SMF userlist with this query
INSERT IGNORE INTO smf_members SET member_name='$username', id_group='9', real_name='$firstname $lastname', passwd='".sha1(strtolower($password))."',  date_registered='$signup_date', email_address='$email', website_title='HMM Profile', website_url='http://www.site.org/$profile_id?code=$profile_key', signature='http://www.site.org/$profile_id?code=$profile_key', pm_email_notify='1', show_online='1';

That part works.. but what is happening is once a user logs into the forum for the first time...
attempt 1 - wrong password
attempt 2 - redirects back to index with no error
attempt 3 - logs in fine
attept > 3 - logs in fine

Seems like it happens on every account I've tested on, and multiple browsers. I thought it might be because there is no salt being added, but it looked like the salt gets generated once they log in (even on admin generated accounts) but I might be wrong. After the first attempt, the salt is put into the db, but still says wrong password.

Any advice/suggestions/thoughts is appreciated

ThorstenE


Advertisement: