function register_login($userinfo, $is_oauth = null) { global $kekezu; global $_lang; global $_K; $_SESSION['uid'] = $userinfo['uid']; $_SESSION['username'] = $userinfo['username']; $c = $_COOKIE; if ($_K['refer']) { $r = $_K['refer']; } else { $r = 'index.php'; } if (isset($_COOKIE['prom'])) { $prom_obj = keke_prom_class::get_instance(); $url_data = $prom_obj->extract_prom_cookie(); $prom_obj->create_prom_relation($userinfo['uid'], $userinfo['username'], $url_data); $url_data['p'] == 'reg' and $obj_id = $userinfo['uid'] or $obj_id = $url_data['o']; $prom_obj->create_prom_event($url_data['p'], $userinfo['uid'], $obj_id); } $synhtml = keke_user_class::user_synlogin($userinfo['uid'], md5($this->_reg_pwd)); if ($userinfo['status'] == 3 && $this->_reg_type == 1) { if ($userinfo['email'] && !$is_oauth) { $arr = explode("@", $userinfo['email']); $mail_url = keke_user_class::getAllEmail('@' . $arr[1]); } if (!$userinfo['email'] || $is_oauth) { $this->show_msg("注册成功!", 1, "index.php?do=login"); } else { $_SESSION['uid'] = ''; $_SESSION['username'] = ''; $this->show_msg($_lang['register_success_and_excite'] . "{$synhtml}", 1, $mail_url); } } else { if ($this->_reg_type == 2) { $userinfo[pic] = keke_user_class::get_user_pic($userinfo['uid']); $r = $userinfo; db_factory::execute(sprintf(" update %switkey_space set status=1 where uid='%d'", TABLEPRE, $userinfo['uid'])); } $this->show_msg($_lang['register_success'] . "{$synhtml}", 1, 'index.php?do=user&view=account&op=basic'); } }