验证邮箱送积分、送可用资金、送冻结余额 插件


修改user.php

找到

/* 验证用户注册邮件*/ 
elseif ($action == 'validate_email')
{
    $hash = empty($_GET['hash']) ? '' : trim($_GET['hash']);
    if ($hash)
    {
        include_once(ROOT_PATH . 'includes/lib_passport.php');
        $id = register_hash('decode', $hash);
        if ($id > 0)
        {
            $sql = "UPDATE " . $ecs->table('users') . " SET is_validated = 1 WHERE user_id='$id'";
            $db->query($sql);
            $sql = 'SELECT user_name, email FROM ' . $ecs->table('users') . " WHERE user_id = '$id'";
            $row = $db->getRow($sql);
            show_message(sprintf($_LANG['validate_ok'], $row['user_name'], $row['email']),$_LANG['profile_lnk'], 'user.php');
        }
    }
    show_message($_LANG['validate_fail']);
}
修改为/* 验证用户注册邮件 */ 

/* 验证用户注册邮件 */ 
elseif ($action == 'validate_email') 
{ 
$hash = empty($_GET['hash']) ? '' : trim($_GET['hash']); 
if ($hash) 
{ 
include_once(ROOT_PATH . 'includes/lib_passport.php'); 
$id = register_hash('decode', $hash); 
if ($id > 0) 
{ 
$sql = 'SELECT is_validated FROM '.$ecs->table('users')." WHERE user_id='$id'"; 
$row = $db->getRow($sql); 
if($row['is_validated'] == 0) 
{ 
$sql = "UPDATE " . $ecs->table('users') . " SET is_validated = 1 WHERE user_id='$id'"; 
$db->query($sql); 
$sql = 'SELECT user_name, email FROM ' . $ecs->table('users') . " WHERE user_id = '$id'"; 
$row = $db->getRow($sql); 
//验证完成 送积分 by gaojin 201003300850 
include_once(ROOT_PATH .'includes/lib_common.php'); 
log_account_change($id, 0, 0, 0, 100,$GLOBALS['_LANG']['register_points']); 
show_message(sprintf($_LANG['validate_ok'], $row['user_name'], $row['email']),$_LANG['profile_lnk'], 'user.php'); 
} 
else 
{ 
show_message(sprintf('请不要重复验证', $row['user_name'], $row['email']),$_LANG['profile_lnk'], 'user.php'); 
} 
} 
} 
show_message($_LANG['validate_fail']); 
}
说明:

log_account_change($id, 0, 0, 0, 100,$GLOBALS['_LANG']['register_points']);

function log_account_change($user_id, $user_money = 0, $frozen_money = 0, $rank_points = 0, $pay_points = 0, $change_desc = '', $change_type = ACT_OTHER)

对应

分别代表的意思如下:

 * @param   int     $user_id        用户id
 * @param   float   $user_money     可用余额变动
 * @param   float   $frozen_money   冻结余额变动
 * @param   int     $rank_points    等级积分变动
 * @param   int     $pay_points     消费积分变动
 * @param   string  $change_desc    变动说明
 * @param   int     $change_type    变动类型:参见常量文件


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值