Beispiel #1
0
        $tips['errors']['email'] = '该email非法或已经被注册';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if (strtoupper(CHARSET) == 'GBK') {
        $account = kekezu::utftogbk($account);
    }
    $strNameCheck = keke_user_class::check_username($account);
    if ($strNameCheck != 1) {
        $tips['errors']['account'] = $strNameCheck;
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    $strCodeCheck = kekezu::check_secode($code);
    if ($strCodeCheck != 1) {
        $tips['errors']['code'] = $strCodeCheck;
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if (intval($agree) == 0) {
        $tips['errors']['agree'] = '请先同意注册协议';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    //增加$user_type,
    $intRegUid = $objReg->user_register(kekezu::escape($account), $password, $email, $code, 1, $password, $reg_user_type, $reg_user_type_xf);
    $arrUserInfo = keke_user_class::get_user_info($intRegUid);
    $objReg->register_login($arrUserInfo);
}
if (isset($check_username) && !empty($check_username)) {
    $res = keke_user_class::check_username($check_username);
    echo $res;
    die;
}
$_SESSION['spread'] = 'index.php?do=register';
Beispiel #2
0
    $_SESSION['username'] = $arrUserInfo['username'];
    $_SESSION['last_login_time'] = $arrUserInfo['last_login_time'];
    setcookie($type . 'uid', 1, time() + 3600 * 24);
}
$arrApiNames = keke_glob_class::get_open_api();
if (isset($formhash)) {
    if ($email) {
        if (keke_user_class::user_checkemail($email) != 1) {
            $tips['errors']['email'] = '该email非法或已经被注册';
            kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
        }
    }
    if (strtoupper(CHARSET) == 'GBK') {
        $account = kekezu::utftogbk($account);
    }
    $strNameCheck = keke_user_class::check_username($account);
    if ($strNameCheck != 1 && $account != $_SESSION['username']) {
        $tips['errors']['account'] = $strNameCheck;
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if (!$password) {
        $password = kekezu::randomkeys(6);
    }
    if (intval($agree) == 0) {
        $tips['errors']['agree'] = '请先同意注册协议';
        kekezu::show_msg($tips, NULL, NULL, NULL, 'error');
    }
    if ($arrBindInfo) {
        global $_K;
        $_K['refer'] = '';
        db_factory::execute("update " . TABLEPRE . "witkey_member_oauth set username='******' where oauth_id='" . $arrBindInfo['oauth_id'] . "' and uid=" . intval($arrBindInfo['uid']));