网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   X-Cart (https://www.0058.net/forumdisplay.php?f=70)
-   -   Recover Password By Email Or Username (https://www.0058.net/showthread.php?t=5054)

Xzavier 2015-03-31 12:41 AM

Recover Password By Email Or Username
 
his code change for X-Cart 4.4.x+ will allow your customers to recover their lost account information by Email or Username instead of one or the other.


Open /skin/common_files/help/Password_Recovery.tpl

Find:
Code:

{$login_field_name}

Replace with:
Code:

Email or Username
Open include/help.php

Find:
Code:

$account = func_query_first("SELECT id, login, password, email, usertype FROM $sql_tbl[customers] WHERE login='$username' AND usertype='$utype' AND status='Y'");
After add:
Code:

// WCM - Search by email if username doesn't match
if (empty($account))
$account = func_query_first("SELECT id, login, password, email, usertype FROM $sql_tbl[customers] WHERE email='" . mysql_real_escape_string(trim($username)) . "' AND usertype='$utype' AND status='Y'");
// / WCM - Search by email if username doesn't match



All times are GMT +8. The time now is 10:39 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.