Skip to content

Commit

Permalink
修改密码找回文案
Browse files Browse the repository at this point in the history
  • Loading branch information
dead-horse committed Mar 13, 2012
1 parent a96ea06 commit 611e73e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion controllers/mail.js
Expand Up @@ -41,7 +41,7 @@ function send_reset_pass_mail(who,token,name,cb){
var to = who;
var subject = config.name + '社区密码重置';
var html = '<p>您好:<p/>' +
'<p>我们收到您在' + config.name + '社区重置密码的请求,请单击下面的链接来重置密码:</p>' +
'<p>我们收到您在' + config.name + '社区重置密码的请求,请在24小时内单击下面的链接来重置密码:</p>' +
'<a href="' + config.host + '/reset_pass?key=' + token + '&name=' + name + '">重置密码链接</a>' +
'<p>若您没有在' + config.name + '社区填写过注册信息,说明有人滥用了您的电子邮箱,请删除此邮件,我们对给您造成的打扰感到抱歉。</p>' +
'<p>' + config.name +'社区 谨上。</p>'
Expand Down
5 changes: 1 addition & 4 deletions controllers/sign.js
Expand Up @@ -210,7 +210,7 @@ exports.search_pass = function(req,res,next){
return next(err);
}
mail_ctrl.send_reset_pass_mail(email, retrieveKey, user.name, function(err,success) {
res.render('notify/notify',{success: '我们已给您填写的电子邮箱发送了一封邮件,请点击里面的链接来重置密码。'});
res.render('notify/notify',{success: '我们已给您填写的电子邮箱发送了一封邮件,请在24小时内点击里面的链接来重置密码。'});
});
});
});
Expand All @@ -235,8 +235,6 @@ exports.reset_pass = function(req,res,next) {
}
var now = new Date().getTime();
var oneDay = 1000 * 60 * 60 * 24;
console.log(user);
console.log(user.retrieve_time, now);
if(!user.retrieve_time || now - user.retrieve_time > oneDay) {
return res.render('notify/notify', {error : '该链接已过期,请重新申请。'});
}
Expand Down Expand Up @@ -264,7 +262,6 @@ exports.reset_pass = function(req,res,next) {
if(err) {
return next(err);
}
console.log(user);
return res.render('notify/notify', {success: '你的密码已重置。'});
})
})
Expand Down

0 comments on commit 611e73e

Please sign in to comment.