ecshop 用户名或Email都能登陆

转载,我测试过 可用
打开 /includes/modules/integrates/integrate.php 文件。

找到

if ( t h i s > c h e c k u s e r ( 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;

    }

猜你喜欢

转载自blog.csdn.net/qq_35032024/article/details/82119315