function user_admin_role

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 user.admin.inc user_admin_role($form, $form_state, $role)
cle7 user.admin.inc user_admin_role($form, $form_state, $role)
elmsmedia7 user.admin.inc user_admin_role($form, $form_state, $role)
icor7 user.admin.inc user_admin_role($form, $form_state, $role)
meedjum_blog7 user.admin.inc user_admin_role($form, $form_state, $role)
mooc7 user.admin.inc user_admin_role($form, $form_state, $role)

Form to configure a single role.

See also

user_admin_role_validate()

user_admin_role_submit()

Related topics

11 string references to 'user_admin_role'
cis_install in profiles/cis/cis.install
Implements hook_install().
cis_users_strongarm in profiles/cis/modules/features/cis_users/cis_users.strongarm.inc
Implements hook_strongarm().
field_permissions_permissions_matrix in sites/all/modules/local_contrib/field_permissions/field_permissions.admin.inc
Returns a field permissions matrix that can be inserted into a form.
filter_admin_format_form in modules/filter/filter.admin.inc
Form constructor for the text format add/edit form.
hook_shortcut_default_set in modules/shortcut/shortcut.api.php
Return the name of a default shortcut set for the provided user account.

... See full list

File

modules/user/user.admin.inc, line 951
Admin page callback file for the user module.

Code

function user_admin_role($form, $form_state, $role) {
  if ($role->rid == DRUPAL_ANONYMOUS_RID || $role->rid == DRUPAL_AUTHENTICATED_RID) {
    drupal_goto('admin/people/permissions/roles');
  }

  // Display the edit role form.
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Role name'),
    '#default_value' => $role->name,
    '#size' => 30,
    '#required' => TRUE,
    '#maxlength' => 64,
    '#description' => t('The name for this role. Example: "moderator", "editorial board", "site architect".'),
  );
  $form['rid'] = array(
    '#type' => 'value',
    '#value' => $role->rid,
  );
  $form['weight'] = array(
    '#type' => 'value',
    '#value' => $role->weight,
  );
  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save role'),
  );
  $form['actions']['delete'] = array(
    '#type' => 'submit',
    '#value' => t('Delete role'),
    '#submit' => array('user_admin_role_delete_submit'),
  );

  return $form;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.