Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to possible loop #15

Merged
merged 5 commits into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading