The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Login by username or email Details »» | |||||||||||||||||||||||||||
This code modification was made as part of a request in this thread: https://vborg.vbsupport.ru/showthrea...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:
PHP Code:
Download Now
Show Your Support
|
Comments |
#32
|
|||
|
|||
I am currently using VB 3.74, I have not upgraded to PL1, but I will in a short moment. I don't know how many users have had any resolution to this, and I was nervous for a fraction of a second before I read through the mod and really took a moment to understand what it was doing:
I am a Director of Marketing and training for a modest NFP organization, our initiatives are funded by our member dues, plain and simple. We are planning to open up the site from a pretty non-interactive VB to a defined VB system with users actually entering the system, belonging to member classes, etc. For record keeping, we want our members to log in with their emails, this way, if something changed significantly, they might be inclined to modify their email address in their control panel so that we're all up to date. So, if you are looking to EXLUSIVELY require your members to log in with their emails (don't forget, this changes the Admin CP log in too), open the prescribed file in the original post, and if the file is otherwise unmodified, scroll down to around line 140, this is where you will find : 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)) . "'")) Code:
if $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)) . "'"); Again, this works, and unless VB drastically overhauls the login system, I see this very simple process working for patches to come. Cheers and Merry Christmas/Holidays and Happy New Year! |
#33
|
|||
|
|||
Great, thanks. Installed.
|
#34
|
|||
|
|||
hi everyone,
now that VB4 is released (and i'm running our forum on VB4) is anyone able to update this mod? i'm willing to pay for professional service. see my request here: https://vborg.vbsupport.ru/showthrea...17#post1953217 |
#35
|
|||
|
|||
Can i get for version 4?
|
#36
|
|||
|
|||
Vote on vB.com to have this feature made standard: http://tracker.vbulletin.com/browse/VBIV-9646
|
#37
|
|||
|
|||
Does anyone have this working for v4.x? I'd like to be able to change a v4.x installation to only allow login via email address instead of username (and have the forum only permit one account per email address as well)
|
#38
|
||||
|
||||
Quote:
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 |
#39
|
||||
|
||||
There is a small bug ( a space between - and > ) and gives an error if you upgrade to 3.8.7 PL2 so here is the working code I use:
PHP Code:
|
#40
|
||||
|
||||
I have not tested this, but in vBulletin 4, try this:
In the file includes/functions_login.php, find: PHP Code:
PHP Code:
|
#41
|
|||
|
|||
Quote:
Code:
Fatal error: Cannot redeclare fetch_replaced_session_url() (previously declared in root/includes/functions_login.php:14) in root/includes/functions_login.php on line 568 |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|