ecshop商城用户名和邮箱都能登陆方法
2016-06-13 13:05 来源:www.chinab4c.com 作者:ecshop专家
修改方法:/includes/modules/integrates/integrate.php文件约145– 162行的用户登入函数.如下 function login($username, $password, $remember = null) { if ($this->check_user($username, $password) > 0) { if ($this->need_sync) { $this->sync($username,$password); } $this->set_session($username); $this->set_cookie($username, $remember); return true; } else { return false; } } 修改为: 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; } if ($this->check_user($username, $password) > 0) { if ($this->need_sync) { $this->sync($username,$password); } $this->set_session($username); $this->set_cookie($username, $remember); return true; } else { return false; } }
最近更新
常用插件
- ecshop快递发货单打印商品
ecshop快递发货单打印商品信息,大家都知道ecshop快递单打印的时候,只能...
- ecshop按分类筛选销售排行
ecshop按分类筛选销售排行...
- ecshop选择下单时间插件
ecshop选择下单时间插件主要是根据不同的下单配送要求,在ecshop购物车...
- ecshop供应商插件免费下载
ecshop供应商插件免费下载...
- ecshop二次开发售后维修卡
插件介绍: 本插件是用于专门从事电子,信息,软件等售后服务关键比...