From 3b6c66f3d80c3bef1eca76952861f4b624af09de Mon Sep 17 00:00:00 2001 From: "William Tam (WNET)" Date: Wed, 9 Oct 2024 09:39:59 -0400 Subject: [PATCH] Fix to possible loop (#15) * VPPA debug * more VPPA debug * logout on no pid * remove logging * one less loop thing --- templates/userinfo.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/userinfo.php b/templates/userinfo.php index c1659b0..fdb9ae9 100644 --- a/templates/userinfo.php +++ b/templates/userinfo.php @@ -11,11 +11,12 @@ $auth_client = $passport->get_pmsso_client(); $userinfo = $auth_client->check_pmsso_login(); } -if (empty($userinfo['first_name'])) { +if (empty($userinfo['pid'])) { // just in case, log them out, maybe they've got a bad cookie + error_log("logging out for no pid: " .json_encode($userinfo)); $auth_client->logout(); - // not logged in, redirect to loginform - wp_redirect(site_url('pbsoauth/loginform')); + // not logged in, redirect to home + wp_redirect(site_url()); exit(); } $mvault_client = $passport->get_mvault_client();