Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Custom submit handler for shib_auth Advanced Settings form
- */
- function qdr_sso_shib_auth_admin_advanced_form_submit($form, &$form_state) {
- // Set ShibAuthTermsVer in Dataverse db to update the value of the latest T&C version
- $terms_ver = $form_state[values]['shib_auth_terms_ver'];
- $data = http_build_query(array('ShibAuthTermsVer' => $terms_ver);
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "http://localhost:8080/api/v1/admin/settings");
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-HTTP-Method-Override: PUT'));
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
- $response = curl_exec($ch);
- curl_close($ch);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement