ECSHOP邮箱email用户名都可以登陆的方法

2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家

打开 /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)