From 9dc4f9df792b3ce0323133b6a484045e2a798259 Mon Sep 17 00:00:00 2001 From: William Tam Date: Tue, 1 Oct 2024 10:28:45 -0400 Subject: [PATCH] vppa assent inline with activation --- templates/oauthcallback.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/oauthcallback.php b/templates/oauthcallback.php index 65f3c59..f02f155 100644 --- a/templates/oauthcallback.php +++ b/templates/oauthcallback.php @@ -113,6 +113,13 @@ if (isset($mvaultinfo["membership_id"])) { $mvaultinfo = $mvault_client->activate($membership_id, $pbs_uid); } + // handle VPPA assent during activation + if (isset($userinfo["vppa_redirect"])) { + // reset the login_referrer again + setcookie( 'pbsoauth_login_referrer', $login_referrer, 0, '/', $_SERVER['HTTP_HOST']); + wp_redirect($userinfo["vppa_redirect"]); + exit(); + } } // is the person activated now? if (!isset($mvaultinfo["membership_id"])) {