On Line 100
Change
PHP Code:
AND username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'
to
PHP Code:
AND email = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'
On Line 105
Change
PHP Code:
if ($user = $vbulletin->db->query_first("SELECT userid, username, email, languageid FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string($username) . "' AND usergroupid <> 3"))
to
PHP Code:
if ($user = $vbulletin->db->query_first("SELECT userid, username, email, languageid FROM " . TABLE_PREFIX . "user WHERE email = '" . $vbulletin->db->escape_string($username) . "' AND usergroupid <> 3"))
On Line 140
Change
PHP Code:
if ($vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, infractiongroupids, username, password, salt FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'"))
to
PHP Code:
if ($vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, infractiongroupids, username, password, salt FROM " . TABLE_PREFIX . "user WHERE email = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'"))
I did that and was able to login with my email instead of username. Didn't really test it a lot so don't know if it has any other ramifications with the script in other areas.