Skip to content

Commit

Permalink
logout on no pid
Browse files Browse the repository at this point in the history
  • Loading branch information
tamw-wnet committed Oct 8, 2024
1 parent b48de94 commit 31f9503
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/userinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
$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'));
Expand Down

0 comments on commit 31f9503

Please sign in to comment.