#21 redirect to source page if parameter is set

v1.2.0
aymm 2 years ago
parent 6c93583f32
commit 72fb3ede13
Signed by: phlaym
GPG Key ID: A06651BAB6777237
  1. 7
      auth_callback.php

@ -5,8 +5,13 @@ require_once __DIR__ .'/bootstrap.php';
if (isset($_GET['code'])) {
$success = $api->authenticate($_GET['code']);
$from = empty($_GET['from']) ? null : $_GET['from'];
$page = 'index.php';
if (!empty($_GET['from'])) {
$page = $_GET['from'];
}
if ($success) {
redirect('index.php');
redirect($page);
} else {
quit(get_page_header().'Echo error authenticating');
}

Loading…
Cancel
Save