message(lang('error_wrong_captcha')); } if ($continue) { // checks and errors foreach ($_REQUEST as $k => $v) { if (!is_array($v)) { $_REQUEST[$k] = trim($v); } } $_REQUEST['subpool_id'] = $_SESSION['subpool_id']; $errors__dataform = participantform__check_fields($_REQUEST, false); $error_count = count($errors__dataform); if ($error_count > 0) { $continue = false; } $response = participantform__check_unique($_REQUEST, "create"); if (isset($response['disable_form']) && $response['disable_form']) { $continue = false; $proceed = false; unset($_SESSION['subpool_id']); unset($_SESSION['rules']); unset($_SESSION['pauthdata']['pw_provided']); unset($_SESSION['pauthdata']['submitted_checked_pw']); if ($settings['subject_authentication'] == 'token') { redirect("public/"); } else { redirect("public/participant_login.php"); } } elseif ($response['problem']) { $continue = false; }
$_REQUEST['participant_id'] = $participant['participant_id']; if (isset($participant['pending_profile_update_request']) && $participant['pending_profile_update_request'] == 'y' && isset($participant['profile_update_request_new_pool']) && $participant['profile_update_request_new_pool']) { $_REQUEST['subpool_id'] = $participant['profile_update_request_new_pool']; } // checks and errors foreach ($_REQUEST as $k => $v) { if (!is_array($v)) { $_REQUEST[$k] = trim($v); } } $errors__dataform = participantform__check_fields($_REQUEST, false); $error_count = count($errors__dataform); if ($error_count > 0) { $continue = false; } $response = participantform__check_unique($_REQUEST, "edit", $_REQUEST['participant_id']); if ($response['problem']) { $continue = false; } if ($continue) { if (isset($participant['pending_profile_update_request']) && $participant['pending_profile_update_request'] == 'y') { $_REQUEST['pending_profile_update_request'] = 'n'; $_REQUEST['profile_update_request_new_pool'] = NULL; message(lang('profile_confirmed') . '<BR>'); } $participant = $_REQUEST; $participant['last_profile_update'] = time(); $done = orsee_db_save_array($participant, "participants", $participant['participant_id'], "participant_id"); if ($done) { message(lang('changes_saved')); log__participant("edit", $participant['participant_id']);