ecshop实现用户名和Email都能登录 ,已在ECSHOP2.7.2版测试通过。
打开 /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; }
实现了ecshop实现用户名和Email都能登录的效果。
按字母顺序浏览:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
→我们致力于为广大网民解决所遇到的各种电脑技术问题 如果您认为本词条还有待完善,请 编辑词条