Just updating my original post for 4.0.16+:
The $user_data query is different in my original post in include/login.php, look for this code now:
Code:
$user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE login='$username' AND usertype='$usertype' AND status='Y'");
Replace with:
Code:
$user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE (login='$username' or email='$username') AND usertype='$usertype' AND status='Y'");
Since this is such a minimal php change, patch tools *SHOULD* be able to update this line without much trouble. Keep in mind Upgrade kits also upgrade template .tpl files as well.