The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I want my forum to be setup so that users use their email addresses to login instead of username. I did a search on this forum, and this is the closet to what I wanted:
https://vborg.vbsupport.ru/showthread.php?t=96832 This is for v3.5.0 RC3 and login with either username or email, but I have 3.8.4 PL1 and I want login with email only, not username. I tried: File: ./includes/functions_login.php Line: 140 CHANGED 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)) . "'")) TO 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)) . "'")) It didn't seem to work. Can anyone help me with this? Thanks. |
#2
|
|||
|
|||
![]()
You have to replace it in the strike queries as well, I just tried it and it worked for me. There were 3 places I changed it from username = to email =
|
#3
|
|||
|
|||
![]()
I have limited IT skills, so can you be more specific? What are 3 places you changed? Thanks.
|
#4
|
|||
|
|||
![]()
On Line 100
Change PHP Code:
PHP Code:
On Line 105 Change PHP Code:
PHP Code:
Change PHP Code:
PHP Code:
|
#5
|
|||
|
|||
![]()
Dylanblitz,
Thanks so much for helping me. It worked in the forum, but I think further mod is required for ACP and MCP. Here's the error when logging in ACP: =============================== Database error in vBulletin 3.8.4: Invalid SQL: SELECT COUNT(*) AS strikes FROM strikes WHERE strikeip = 'xx.xx' AND email = 'Administrator'; MySQL Error : Unknown column 'email' in 'where clause' Error Number : 1054 Request Date : Saturday, October 17th 2009 @ 03:29:49 PM Error Date : Saturday, October 17th 2009 @ 03:29:49 PM Script : http://www.xxx.com/login.php?do=login Referrer : http://www.xxx.com/iamadmin/ IP Address : xx.xx Username : Administrator Classname : vB_Database MySQL Version : 4.1.22-max-log ================================ I hope you can help me with this. Thanks a lot. |
#6
|
|||
|
|||
![]()
Actually, I found an easier way. Revert what I told you before
in the includes/function_login.php Find on Line 135 PHP Code:
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|