function miniorange_saml_remove_account in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7
1 string reference to 'miniorange_saml_remove_account'
File
- ./
miniorange_saml_customer_setup.inc, line 201 - Contains form for customer setup.
Code
function miniorange_saml_remove_account(&$form, $form_state) {
global $base_url;
if (isset($_POST['value_check']) && $_POST['value_check'] == 'True') {
$username = variable_get('miniorange_saml_idp_customer_admin_email', NULL);
$phone = variable_get('miniorange_saml_idp_customer_admin_phone', NULL);
$current_status = 'MOIDP_CUSTOMER_SETUP';
variable_del('miniorange_saml_customer_admin_email');
variable_del('miniorange_saml_customer_admin_phone');
variable_del('miniorange_saml_customer_id');
variable_del('miniorange_saml_customer_api_key');
variable_del('miniorange_saml_customer_admin_token');
variable_set('miniorange_saml_status', $current_status);
drupal_set_message(t('Your account has been removed successfully!'), 'status');
$_POST['value_check'] = 'False';
}
else {
$myArray = array();
$myArray = $_POST;
$form_id = $_POST['form_id'];
$form_token = $_POST['form_token'];
$op = $_POST['op'];
$build_id = $_POST['form_build_id'];
?>
<html>
<head>
<title>Confirmation</title>
<link href="https://fonts.googleapis.com/css?family=PT+Serif" rel="stylesheet">
</head>
<body style="font-family: 'PT Serif', serif;">
<div style="margin: 15% auto; height:30%; width: 40%; background-color: #eaebed; text-align: center; box-shadow: 10px 5px 5px darkgray; border-radius: 2%;">
<div style="color: #a94442; background-color:#f2dede; padding: 15px; margin-bottom: 20px; text-align:center; border:1px solid #E6B3B2; font-size:16pt; border-radius: 2%;">
<strong>Are you sure you want to remove account..!!</strong>
</div>
<br/>
<form name="f" method="post" action="" id="mo_remove_account">
<div>
<input type="hidden" name="op" value=<?php
echo $op;
?>>
<input type="hidden" name="form_build_id" value= <?php
echo $build_id;
?>>
<input type="hidden" name="form_token" value=<?php
echo $form_token;
?>>
<input type="hidden" name="form_id" value= <?php
echo $form_id;
?>>
<input type="hidden" name="value_check" value= 'True'>
</div>
<div style="margin: auto; text-align: center;" class="mo2f_modal-footer">
<input type="submit" style=" padding:1%; width:100px; background: #0091CD none repeat scroll 0% 0%; cursor: pointer; font-size:15px; border-width: 1px; border-style: solid; border-radius: 3px; white-space: nowrap; box-sizing: border-box;border-color: #0073AA; box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset; color: #FFF;" name="miniorange_confirm_submit" class="button button-danger button-large" value="Confirm"/>
<a style=" padding:1%; width:100px; background: #0091CD none repeat scroll 0% 0%; cursor: pointer; font-size:15px; border-width: 1px; border-style: solid; border-radius: 3px; white-space: nowrap; box-sizing: border-box;border-color: #0073AA; box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset; color: #FFF; text-decoration: none; " href=<?php
echo $base_url . "/admin/config/people/miniorange_saml/customer_setup";
?> >Cancel</a>
</div>
</form>
</div>
</body>
</html>
<?php
exit;
}
}