function _shib_auth_rule_delete_confirm_form_submit in Shibboleth Authentication 7.4
Same name and namespace in other branches
- 6.4 shib_auth_roles_forms.inc \_shib_auth_rule_delete_confirm_form_submit()
This function deletes an existing rule.
File
- ./
shib_auth_roles_forms.inc, line 88 - Roles manager forms.
Code
function _shib_auth_rule_delete_confirm_form_submit($form, &$form_state) {
$id = $form_state['build_info']['args'][0];
if ($id = intval($id)) {
$ret = db_delete('shib_auth')
->condition('id', $id)
->execute();
if ($ret) {
drupal_set_message(t('Rule <strong>#@id</strong> has been deleted.', array(
'@id' => $id,
)));
}
else {
drupal_set_message(t('Failed to delete rule.'), 'error');
}
}
else {
drupal_set_message(t("Invalid rule id."), 'error');
}
drupal_goto('admin/config/people/shib_auth/rules');
}