mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-31 04:34:27 +00:00
Ensure any code after a redirect is not executed
This commit is contained in:
@@ -33,6 +33,7 @@ if (isset($_GET['code'])) {
|
||||
|
||||
$_SESSION['access_token'] = $curl->response->access_token;
|
||||
header('Location: ?');
|
||||
exit;
|
||||
} elseif (!empty($_SESSION['access_token'])) {
|
||||
// Use the access token to send an email.
|
||||
$curl = new Curl();
|
||||
|
||||
@@ -33,6 +33,7 @@ if (isset($_GET['code'])) {
|
||||
|
||||
$_SESSION['access_token'] = $curl->response->access_token;
|
||||
header('Location: ?');
|
||||
exit;
|
||||
} elseif (!empty($_SESSION['access_token']) && !isset($_GET['retry'])) {
|
||||
// Use the access token to retrieve the profile.
|
||||
$curl = new Curl();
|
||||
|
||||
Reference in New Issue
Block a user