function shib_auth_edit_rule in Shibboleth Authentication 7.4
Same name and namespace in other branches
- 5.3 shib_auth_admin.inc \shib_auth_edit_rule()
- 6.4 shib_auth_roles_forms.inc \shib_auth_edit_rule()
- 6.3 shib_auth.module \shib_auth_edit_rule()
Constructor of the rule edit form.
1 string reference to 'shib_auth_edit_rule'
- shib_auth_menu in ./
shib_auth.module - Implements hook_menu().
File
- ./
shib_auth_roles_forms.inc, line 248 - Roles manager forms.
Code
function shib_auth_edit_rule($form, &$form_state) {
$id = $form_state['build_info']['args'][0];
// Calls the edit form, with the fields of the existing rule.
if (is_int((int) $id)) {
$rule = db_select('shib_auth', 'c')
->fields('c')
->condition('id', $id, '=')
->execute()
->fetchAssoc();
return shib_auth_edit_form(array(
$rule['id'],
$rule['field'],
urldecode($rule['regexpression']),
unserialize($rule['role']),
t('Apply'),
$rule['sticky'],
));
}
}