находим приблизительно 167 строку а для тройки ~ 140 строку
Code: Select all
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)) . "'"))
И заменяем на:
Code: Select all
if (!$vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, username, password, salt FROM " . TABLE_PREFIX . "user WHERE username = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'"))
{
$vbulletin->userinfo = $vbulletin->db->query_first("SELECT userid, usergroupid, membergroupids, username, password, salt FROM " . TABLE_PREFIX . "user WHERE email = '" . $vbulletin->db->escape_string(htmlspecialchars_uni($username)) . "'");
}
if ($vbulletin->userinfo)
Теперь авторизововаться можно как по логину, так и по email