To get this to work in 4.1.x in login.php change:
Code:
$user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE BINARY login='$username' AND usertype='$usertype' AND status='Y'");
to
Code:
$user_data = func_query_first("select * from $sql_tbl[customers] where (login='$username' or email='$username') and usertype='$usertype' and status='Y'");
$username = $user_date['username'];
The login script makes additional checks against the username, and it is still set as the email address which will cause those checks to fail until we reset the username to the the actual username.