您现在的位置是:首页 > 教程 > ecshop商城教程ecshop商城教程

ecshop邮箱email用户名都可以登陆的实现方法

争赵2023-12-11 16:59:11ecshop商城教程已有人查阅

导读打开 /includes/modules/integrates/integrate.php 文件;function login($username, $password, $remember = null)

打开 /includes/modules/integrates/integrate.php 文件
找到
function login($username, $password, $remember = null)
{
if ($this->check_user($username, $password) > 0)
改为
function login($username, $password, $remember = null)
{
if(!is_email($username))
{
$sql = "select ".$this->field_name." from ".$this->table($this->user_table)." where ".$this->field_email."='".$username."'";
$username = $this->db->getOne($sql);
if(!$username) return false;
//echo $sql;exit;
}
if ($this->check_user($username, $password) > 0)

本文标签:

很赞哦! ()

留言与评论 (共有 条评论)
验证码:

本栏推荐

相关标签