#21 redirect to source page if parameter is set
This commit is contained in:
parent
6c93583f32
commit
72fb3ede13
@ -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…
Reference in New Issue
Block a user