View Single Post
  #107  
Old 10-17-2008, 08:54 AM
 
skipmartin skipmartin is offline
 

Advanced Member
  
Join Date: Oct 2003
Posts: 30
 

Default Re: Use E-mail address instead of username 3.5.x & 4.0

To get this to work in 4.1.x in login.php change:
Code:
$user_data = func_query_first("SELECT * FROM $sql_tbl[customers] WHERE BINARY login='$username' AND usertype='$usertype' AND status='Y'");
to
Code:
$user_data = func_query_first("select * from $sql_tbl[customers] where (login='$username' or email='$username') and usertype='$usertype' and status='Y'"); $username = $user_date['username'];

The login script makes additional checks against the username, and it is still set as the email address which will cause those checks to fail until we reset the username to the the actual username.
__________________
Andy Melichar, Tech Director - REBEL INTERACTIVE -
andy@rebel-interactive.com - X-Cart version 4.1.3
Reply With Quote