ecshop优化1-使用email登录
来源:互联网 发布:上帝粒子知乎 编辑:程序博客网 时间:2024/06/05 00:22
http://www.ecshop.co/article-1519.html
首先修改注册部分
1,themes/****/user_passport.dwt 会员名称输入的表单,将之去掉
2,js/user.js 找到 function register() 并将以下代码删除
if (username.length == 0)
{
msg += username_empty + '\n';
}
else if (username.match(/^\s*$|^c:\\con\\con$|[%,\'\*\"\s\t\<\>\&\\]/))
{
msg += username_invalid + '\n';
}
else if (username.length < 3)
{
//msg += username_shorter + '\n';
}
3,user.php 找到 elseif ($action == 'act_register') 将以下代码
$username = isset($_POST['username']) ? trim($_POST['username']) : '';
改为
$username = isset($_POST['email']) ? trim($_POST['email']) : '';
其次实现登录时可以使用email登录
1,includes/modules/integrates/integrate.php 找到 function login 并将整个函数改为以下代码
function login($username, $password, $remember = null)
{
if(is_email($username))
{
$sql = "sel ect ".$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优化1-使用email登录
- ECSHOP支持用手机号码登录、邮箱登录、Email登录
- ECSHOP同时使用用户名、邮箱、手机号码登录
- ECShop页面标题优化--使用自定义标题
- Grails, spring-security-core plugin:使用email登录
- ecshop后台登录绕过
- ecshop无法登录
- ecshop 手机号码 邮箱 登录
- ecshop二次开发--单点登录
- ecshop二次开发--单点登录
- ecshop二次开发--单点登录
- ecshop二次开发--单点登录
- ecshop二次开发--单点登录
- ecshop安全问题:ecshop修改后台登录路径
- 解决ecshop退出登录会清空购物车的bug优化最完美方法
- ecshop登录支持手机号码登录、邮箱登录
- ECSHOP的优化方案
- ecshop title优化
- vim使用
- 黑马程序员_动态代理入门讲解
- 卡牌游戏战斗系统的设计和实现(三)
- 让MyEclipse不报JavaScript错
- Eclipse 安装配置指南
- ecshop优化1-使用email登录
- 一般数据语句或者建表问题:yiorg.springframework.dao.InvalidDataAccessResourceUsageException:
- 给定一个十进制整数N,求出从1到N的所有整数中出现”1”的个数
- Qt通过ODBC连接SQL_server_2008
- CxImage 初识
- 如何才能找到被偷的iphone苹果手机
- ecshop优化2-商品页购买数量加减按钮ecshop购物车页加减按钮
- 检讨:为何远超预期的时间在"excel应用:选中sheet1中a列与sheet2中b列重复值,并删除对应行”,大概用了8小时
- JNDI 介绍和使用