wrong variable

main
lub 2 weeks ago
parent 9f44dfc9bb
commit 10671935b8

@ -46,7 +46,7 @@ if (isset($_GET['secret']) && $_GET['secret'] === REGISTRATION_PASSWORD) {
curl_setopt($ch, CURLOPT_URL, SYNAPSE_URL.'/_matrix/client/v3/rooms/'.ROOM_ID.'/send/m.room.message/'.filter_var($_POST['nonce'], FILTER_SANITIZE_FULL_SPECIAL_CHARS));
curl_setopt($ch, CURLOPT_PUT, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'body' => $decoded_response->user_id.' just registered',
'body' => '@'.$username.':imninja.net just registered',
'msgtype' => 'm.text'
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
@ -55,7 +55,7 @@ if (isset($_GET['secret']) && $_GET['secret'] === REGISTRATION_PASSWORD) {
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if ($curl_error($ch) || curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) {
if (curl_error($ch) || curl_getinfo($ch, CURLINFO_HTTP_CODE) !== 200) {
echo 'Registration for "'.$username.'" unsuccessful. Please try again later.';
exit;
}

Loading…
Cancel
Save