Skip to content

Commit

Permalink
Fix to possible loop (#15)
Browse files Browse the repository at this point in the history
* VPPA debug

* more VPPA debug

* logout on no pid

* remove logging

* one less loop thing
  • Loading branch information
tamw-wnet authored Oct 9, 2024
1 parent 5e2e942 commit 3b6c66f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions templates/userinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 3b6c66f

Please sign in to comment.