Back to vBulletin 3.8 Add-ons

Login by username or email
Mod Version: 1.00, by Marco van Herwaarden

vB Version: 3.5.0 RC3 Rating: (1 vote - 4.00 average) Installs: 47
Released: 24 Sep 2005 Last Update: Never Downloads: 205
Not Supported Code Changes  

This code modification was made as part of a request in this thread: http://www.vbulletin.org/forum/showt...5&page=1&pp=15

All that it does is allow to use the email address instead of the username to be used to login (username also still works).

Since people where stating that it should be released, well here it goes.

1 File edit:
in file includes/functions_login.php, find:
PHP Code:
    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)) . "'")) 
and replace by:
PHP Code:
 // Start hack login with mail address (MarcoH64)
//    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)) . "'"))
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)
// End hack login with mail address (MarcoH64) 
This will allow logging in with either mail or username.

Download

File Type: %1$s Login with Email Address v1.00.zip (685 Bytes, 319 downloads)


vblts.ru supports vBulletin®, 2022-2024