function shib_auth_edit_rule in Shibboleth Authentication 6.3
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()
- 7.4 shib_auth_roles_forms.inc \shib_auth_edit_rule()
Edits an existing rule, containing he rule name, the server attrubite, the RegExp, and the role names
@returns the edit form, with the fields already filled in
Parameters
$form_state contains all of the data of the form:
2 string references to 'shib_auth_edit_rule'
- shib_auth_menu in ./
shib_auth.module - Generate the menu element to access the Shibboleth authentication module's administration page @returns HTML text of the administer menu element
- shib_auth_new_rule in ./
shib_auth.module - Saves a new rule, containing he rule name, the server attrubite, the RegExp, and the role names
File
- ./
shib_auth.module, line 741 - This is a Shibboleth authentication module.
Code
function shib_auth_edit_rule($form_state, $id) {
$form = array();
// calls the edit form, with the fields of the existing rule
if (is_int((int) $id)) {
$rule = db_query("SELECT * FROM {shib_auth} WHERE id = %d", array(
$id,
));
$db_entry = db_fetch_array($rule);
return shib_auth_edit_form(array(
$db_entry['id'],
$db_entry['field'],
urldecode($db_entry['regexpression']),
unserialize(urldecode($db_entry['role'])),
'Apply',
));
}
}