Quote:
Originally Posted by jerx
Works on vb 3.7.3 pl1. This is the code I used:
Code:
// Start hack login with mail address (MarcoH64)
// 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)) . "'"))
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)) . "'"))
{
$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)) . "'");
}
if ($vbulletin->userinfo)
// End hack login with mail address
That works, too. Are there any differences between both versions, eg performance, security or stability wise?
|
I can confirm that ONLY the above code works for 3.8.5 too
I add that you also need to change Username to Name/email. Look in language for: <strong>$vbphrase[username]</strong>
Then Look for template register and search in it for: <strong>$vbphrase[username]</strong> and change it to <strong>$vbphrase[user_name]</strong>
This will keep in register template the phrase Username and in login box Name/Email.
If you don't do this modification You will have allot of users registering with email address instead of Username.
Thanks