ecshop解决邮件无限发送,没有时间限制的问题
user.php
找到:
if (send_regiter_hash($user_id))
{
/* 用户没有登录 */
$result['message'] = $_LANG['validate_mail_ok'];
die($json->encode($result));
}
替换为:
//www.lyecs.com 老杨ecshop
if(isset($_SESSION['send_email_time'])){
if(gmtime()-$_SESSION['send_email_time']<30){
$result['error'] = 1;
$result['message'] ='您的操作过于频繁啦,30秒内请勿重复操作!';
die($json->encode($result));
}
}
if (send_regiter_hash($user_id))
{
$result['message'] = $_LANG['validate_mail_ok'];
$_SESSION['send_email_time']=gmtime();//www.lyecs.com 老杨ecshop
die($json->encode($result));
}
三十秒内发送邮件就会提示重复!
如图: