function userLogout() {$ch = curl_init();curl_setopt($ch, CURLOPT_URL, 'https://xxxxxxxxxxxxxxxx/account/logout.php');curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_POST, 1);$post = array( 'redirect' => 'https://xxxxxxxxxxxxxxxxx/pages/home.php', 'page_id' => '2');curl_setopt($ch, CURLOPT_POSTFIELDS, $post);$result = curl_exec($ch);if (curl_errno($ch)) { echo 'Error:' . curl_error($ch);}curl_close($ch);}
string(183) "There was an uncatched exceptionmd5(): Argument #1 ($string) must be of type string, array givenin line (173) of (/framework/Sessions/SameSiteSessionStarter.php):"
function logoutUserNew() {$page_id = 2;$redirect_url = 'https://xxxxxxxxxxxxxxx/pages/home.php';$_SESSION['USER_ID'] = null;$_SESSION['GROUPS_ID'] = null;$_SESSION['USERNAME'] = null;$_SESSION['PAGE_PERMISSIONS'] = null;$_SESSION['SYSTEM_PERMISSIONS'] = null;$_SESSION = [];session_unset();unset($_COOKIE[session_name()]);session_destroy();header('Location: '.WB_URL.'/index.php');exit; }
$url_this = WB_URL.$_SERVER['PHP_SELF'];$url_target = $url_this; // sometimes i use different targets xml-export or pdf-export (for that this stupid additional var here dont need)$sec_ftan = $wb->getFtan($wb->createFTAN());$sec_recordid = $wb->getIdKey('record_id');$form_name = 'form_'.PAGE_ID;$msg_confirm = 'bla bla bla\n another bla bla bla';$ui_start = '...';$ui_start .= '<form id="'.$form_name.'" name="'.$form_name.'" action="'.$url_this.'" method="post" target="_self" onSubmit="return confirm(\''.$msg_confirm.'\')" />'."\n";$ui_start .= '<input type="hidden" name="'.$sec_ftan['name'].'" value="'.$sec_ftan['value'].'" />'."\n";$ui_start .= '<input type="hidden" name="record_id" value="'.$sec_recordid.'" />'."\n";$ui_start .= '<input type="submit" value="zugang löschen" />'."\n";$ui_start .= '</form>'."\n";echo $ui_start;if (!empty($_POST)) { if ($wb->checkFtan()) { if ($sql_result_deactivate) { confirmMail(); // send mail to user that account is off logoutUserNew(); // logout user } else { // fail msg (maybe) } // end sql_result... } // end checkFtan} // end empty