Ejemplo n.º 1
0
    $cat_array = $field->cats;
    if ($task != "step1" && count($cat_array) == 0) {
        $task = "step1";
    }
    if ($validate == 1) {
        $is_error = $field->is_error;
    }
    if ($task != "step1" && count($field->fields_all) == 0) {
        $task = "step2do";
    }
}
if ($task == "step2do") {
    // PROFILE FIELD INPUTS PROCESSED AND CHECKED FOR ERRORS ABOVE
    // IF THERE IS NO ERROR, ADD USER AND USER PROFILE AND CONTINUE TO STEP 3
    if ($is_error == 0) {
        $new_user->user_create($signup_email, $signup_username, $signup_password, $signup_timezone, $signup_lang, $signup_cat, $field->field_query);
        // INVITE CODE FEATURES
        if ($setting['setting_signup_invite'] != 0) {
            if ($setting['setting_signup_invite_checkemail'] != 0) {
                $invitation = $database->database_fetch_assoc($database->database_query("SELECT * FROM se_invites WHERE invite_code='{$signup_invite}' AND invite_email='{$signup_email}' LIMIT 1"));
            } else {
                $invitation = $database->database_fetch_assoc($database->database_query("SELECT * FROM se_invites WHERE invite_code='{$signup_invite}' LIMIT 1"));
            }
            // ADD USER TO INVITER'S FRIENDLIST
            $friend = new se_user(array($invitation['invite_user_id']));
            if ($friend->user_exists == 1) {
                if ($setting['setting_connection_allow'] == 3 || $setting['setting_connection_allow'] == 1 || $setting['setting_connection_allow'] == 2 && $new_user->user_info['user_subnet_id'] == $friend->user_info['user_subnet_id']) {
                    // SET RESULT, DIRECTION, STATUS
                    switch ($setting['setting_connection_framework']) {
                        case "0":
                            $direction = 2;