function save_userinfo($reg_username, $reg_email, $reg_uid = null, $user_type, $reg_user_type_xf) { global $_K; $reg_username = kekezu::escape($reg_username); $slt = kekezu::randomkeys(6); $pwd = keke_user_class::get_password($this->_reg_pwd, $slt); $this->_member_obj->setUid($reg_uid); $this->_member_obj->setEmail($reg_email); $this->_member_obj->setUsername($reg_username); $this->_member_obj->setPassword($this->_reg_pwd); $this->_member_obj->setRand_code($slt); $this->_member_obj->setUser_type($user_type); //增加user_type $reg_member_uid = $this->_member_obj->create_keke_witkey_member(); $this->_oltime_obj->setUid($reg_member_uid); $this->_oltime_obj->setUsername($reg_username); $this->_oltime_obj->setLast_op_time(time()); $this->_oltime_obj->setOnline_total_time(0); $this->_oltime_obj->create_keke_witkey_member_oltime(); if ($reg_member_uid) { $buyer_level = keke_user_mark_class::get_mark_level(0, '2'); $seller_level = keke_user_mark_class::get_mark_level('0', '1'); $this->_shop_obj->setShop_type(1); $this->_shop_obj->setUid($reg_member_uid); $this->_shop_obj->setUsername($reg_username); $this->_shop_obj->setShop_name($reg_username); $this->_shop_obj->setShop_status($_K['autoshop'] == '1' ? '1' : '3'); $res_shop_id = $this->_shop_obj->create_keke_witkey_shop(); $this->_space_obj->setUid($reg_member_uid); $this->_space_obj->setUsername($reg_username); $this->_space_obj->setPassword($this->_reg_pwd); $this->_space_obj->setSec_code($pwd); $this->_space_obj->setEmail($reg_email); $this->_space_obj->setReg_time(time()); $this->_space_obj->setReg_ip(keke_glob_class::checkipaddres($this->_reg_ip) ? $this->_reg_ip : '0.0.0.0'); $this->_space_obj->setBuyer_level(serialize($buyer_level)); $this->_space_obj->setSeller_level(serialize($seller_level)); $this->_space_obj->setAutoshop($_K['autoshop']); $this->_space_obj->setUser_type($reg_user_type_xf); //修改用户实名认证类型 $space_id = $this->_space_obj->create_keke_witkey_space(); } $info = array('uid' => $reg_member_uid, 'username' => $reg_username, 'email' => $reg_email); $this->_sys_config['allow_reg_action'] == 1 and keke_user_class::send_email_action_user($info); return $reg_member_uid; }
function save_userinfo($reg_username, $reg_email, $reg_uid = null) { global $_K; $reg_username = kekezu::escape($reg_username); $slt = kekezu::randomkeys(6); $pwd = keke_user_class::get_password($this->_reg_pwd, $slt); $this->_member_obj->setUid($reg_uid); $this->_member_obj->setEmail($reg_email); $this->_member_obj->setUsername($reg_username); $this->_member_obj->setPassword($this->_reg_pwd); $this->_member_obj->setRand_code($slt); $reg_member_uid = $this->_member_obj->create_keke_witkey_member(); $this->_oltime_obj->setUid($reg_member_uid); $this->_oltime_obj->setUsername($reg_username); $this->_oltime_obj->setLast_op_time(time()); $this->_oltime_obj->setOnline_total_time(0); $this->_oltime_obj->create_keke_witkey_member_oltime(); if ($reg_member_uid) { $buyer_level = keke_user_mark_class::get_mark_level(0, '2'); $seller_level = keke_user_mark_class::get_mark_level('0', '1'); $this->_shop_obj->setShop_type(1); $this->_shop_obj->setUid($reg_member_uid); $this->_shop_obj->setUsername($reg_username); $this->_shop_obj->setShop_name($reg_username); $this->_shop_obj->setShop_status($_K['autoshop'] == '1' ? '1' : '3'); $res_shop_id = $this->_shop_obj->create_keke_witkey_shop(); $this->_space_obj->setUid($reg_member_uid); $this->_space_obj->setUsername($reg_username); $this->_space_obj->setPassword($this->_reg_pwd); $this->_space_obj->setSec_code($pwd); $this->_space_obj->setEmail($reg_email); $this->_space_obj->setReg_time(time()); $this->_space_obj->setReg_ip(keke_glob_class::checkipaddres($this->_reg_ip) ? $this->_reg_ip : '0.0.0.0'); $this->_space_obj->setBuyer_level(serialize($buyer_level)); $this->_space_obj->setSeller_level(serialize($seller_level)); $this->_space_obj->setAutoshop($_K['autoshop']); $space_id = $this->_space_obj->create_keke_witkey_space(); } $info = array('uid' => $reg_member_uid, 'username' => $reg_username, 'email' => $reg_email); if ($this->_sys_config['allow_reg_action'] != '1') { if ($reg_member_uid) { $arr = array(); $arr['用户名'] = $reg_username; $arr['网站名称'] = $kekezu->_sys_config['website_name']; keke_msg_class::notify_user($reg_member_uid, $reg_username, 'reg', '注册成功', $arr, '2'); } } else { keke_user_class::send_email_action_user($info); } return $reg_member_uid; }