39 lines (29 sloc) 1.31 KB requireAuth(array( 'saml:idp' => 'http://sso4.ppg.com/adfs/services/trust', 'saml:NameIDPolicy' => "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", 'signature.algorithm' => "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", )); $authdata = $as->getAuthData('saml:sp:NameID'); $authdata = $authdata->getValue(); if (!is_int($authdata) && $authdata <= 0) { echo "I'm sorry, but we did not receive your ID information correctly. Please contact admin@mymedwellness.com to fix this issue."; exit(); } $session = \SimpleSAML\Session::getSessionFromRequest(); $session->cleanup(); $result = beepdata_master("SELECT * FROM `roadrace_users` WHERE company_id=34 and unique_id=" . $authdata . " order by last_overall_update desc LIMIT 0, 1", $db_link); $db_id = $result['id']; if ($db_id > 0 && $result['allow'] != 'n') { login($result, $result["id"], $db_link, 0); header("Location: http://www.mymedwellness.com/medwell_choices.php"); exit(); } else { echo "Opps! It looks like you don't have an account with us yet. Please contact WellnessSupport@ppg.com to fix this issue."; exit(); } ?>