You are here

function shib_auth_edit_rule in Shibboleth Authentication 6.4

Same name and namespace in other branches
  1. 5.3 shib_auth_admin.inc \shib_auth_edit_rule()
  2. 6.3 shib_auth.module \shib_auth_edit_rule()
  3. 7.4 shib_auth_roles_forms.inc \shib_auth_edit_rule()

Edits a rule by calling universal create/edit form

1 string reference 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

File

./shib_auth_roles_forms.inc, line 274
Roles manager forms.

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($db_entry['role']),
      'Apply',
      $db_entry['sticky'],
    ));
  }
}