ecshop 用户名和邮箱都能登陆

1、打开/includes/modules/integrates/integrate.php文件,并找到下面代码

if ($this->check_user($username, $password) > 0)

在它上面添加下面代码段

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;
        }
原文地址:https://www.cnblogs.com/iz100/p/3183072.html