2015-04-18, 01:27 PM
Hello,
I've just converted one phpbb 3.0 board to MyBB and discover small bug.
If user uses reset password option after conversion, he can't login.
It's because reset password change data, but don't clear merge fields in users table: passwordconvert, passwordconverttype and passwordconvertsalt.
This can work only if user first login successfully (= convert password) and then use reset option.
I wrote small plugin to fix it, there is hook and function:
I've just converted one phpbb 3.0 board to MyBB and discover small bug.
If user uses reset password option after conversion, he can't login.
It's because reset password change data, but don't clear merge fields in users table: passwordconvert, passwordconverttype and passwordconvertsalt.
This can work only if user first login successfully (= convert password) and then use reset option.
I wrote small plugin to fix it, there is hook and function:
$plugins->add_hook("member_resetpassword_reset", "passwordresetfix_action");
function passwordresetfix_action() {
global $db, $mybb, $user;
$sql_array = array(
'passwordconvert' => '',
'passwordconverttype' => '',
'passwordconvertsalt' => ''
);
$db->update_query("users", $sql_array, "uid='". (int) $user['uid'] . "'");
}