PDA

View Full Version : Username instead e-mail


adonato
12-15-2012, 08:02 PM
Hello, I would like to know if existe the possibilit when the user register and login to the forum, only use the e-mail for loging and registration? and if he want he can put and username for show in the forums but nothing else.

For registration and login must use the e-mail can be that possible? exist? just like facebook for example?

mokujin
12-15-2012, 10:16 PM
This mod is for vb 3.5 but Marco did not upgrade yet :(
https://vborg.vbsupport.ru/showthread.php?t=96832&page=3&highlight=email

adonato
12-16-2012, 10:56 PM
Sounds good, however I'm looking something that work in the v4 of vbulletin.

ForceHSS
12-17-2012, 01:44 AM
This will work for 4.2.0 PL3
in file includes/functions_login.php, find:

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)) . "'"))


replace with

// 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

It will now allow login with either email or username

adonato
12-17-2012, 05:39 PM
Excellent!!!11 it would be good to use it like and plugin or hack no?

--------------- Added 1355770367 at 1355770367 ---------------

it work with mobile theme too?

ForceHSS
12-17-2012, 11:32 PM
Excellent!!!11 it would be good to use it like and plugin or hack no?

--------------- Added 1355770367 at 1355770367 ---------------

it work with mobile theme too?

Have not tested with mobile theme but it should work with it.

adonato
12-18-2012, 01:00 AM
Excellent!!!!!!