Quote:
Originally Posted by B00MER
Use E-mail address instead of username for X-Cart 3.5.x & 4.0.
Let users use either their email address or username to login instead of JUST the username.
Edit include/login.php find:
Code:
$user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE login='$username' AND usertype='$usertype' AND status='Y'");
Change to:
Code:
$user_data=func_query_first("select * from $sql_tbl[customers] where (login='$username' or email='$username') and usertype='$usertype' and status='Y'");
Should work without troubles on 3.5.x and 4.0.x
|
I know this is an old post, but how can I make this work in 4.2.x?
The line I found in my login.php looks like this:
Code:
$user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE BINARY LOWER(login)='$username' AND usertype='$usertype' AND status='Y'");
Thanks!