Membership Pugin - logged out after user profile update

Re: [goodonyx] Membership Pugin - logged out after user profile update

By gregThomas - November 20, 2012

Hi goodonyx,

This problem is caused after a user changes their password, as the password stored in the database no longer matches what is stored in the session, so the user is logged out. But you can get around this by doing the following.

Somewhere around line 73 you should see this:

$userNum = mysql_insert_id();

If you add the these two lines after it:

$_SESSION['username'] = $_REQUEST['username'];
$_SESSION['passwordHash'] = md5( $passwordHash );


This will update the session data after the user has updated there profile, and stop them being logged out.

Thanks
Greg Thomas







PHP Programmer - interactivetools.com

Re: [greg] Membership Pugin - logged out after user profile update

By goodonyx - November 20, 2012

Works great. Thanks!