Ensure any code after a redirect is not executed

This commit is contained in:
Zach Borboa
2018-10-01 23:54:52 -07:00
parent 3193b41dcd
commit 0f790e77b6
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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();
+1
View File
@@ -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();