function theme_user_admin_roles


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/
cis7 theme_user_admin_roles($variables)
cle7 theme_user_admin_roles($variables)
elmsmedia7 theme_user_admin_roles($variables)
icor7 theme_user_admin_roles($variables)
meedjum_blog7 theme_user_admin_roles($variables)
mooc7 theme_user_admin_roles($variables)

Returns HTML for the role order and new role form.


$variables: An associative array containing:

  • form: A render element representing the form.

Related topics

2 string references to the theme hook from theme_user_admin_roles()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

user_menu in modules/user/user.module
Implements hook_menu().
user_theme in modules/user/user.module
Implements hook_theme().


modules/user/, line 913
Admin page callback file for the user module.


function theme_user_admin_roles($variables) {
  $form = $variables['form'];

  $header = array(t('Name'), t('Weight'), array(
    'data' => t('Operations'),
    'colspan' => 2,
  foreach (element_children($form['roles']) as $rid) {
    $name = $form['roles'][$rid]['#role']->name;
    $row = array();
    if (in_array($rid, array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) {
      $row[] = t('@name <em>(locked)</em>', array('@name' => $name));
      $row[] = drupal_render($form['roles'][$rid]['weight']);
      $row[] = '';
      $row[] = l(t('edit permissions'), 'admin/people/permissions/' . $rid);
    else {
      $row[] = check_plain($name);
      $row[] = drupal_render($form['roles'][$rid]['weight']);
      $row[] = l(t('edit role'), 'admin/people/permissions/roles/edit/' . $rid);
      $row[] = l(t('edit permissions'), 'admin/people/permissions/' . $rid);
    $rows[] = array(
      'data' => $row,
      'class' => array('draggable'),
  $rows[] = array(array(
    'data' => drupal_render($form['name']) . drupal_render($form['add']),
    'colspan' => 4,
    'class' => 'edit-name',

  drupal_add_tabledrag('user-roles', 'order', 'sibling', 'role-weight');

  $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('id' => 'user-roles')));
  $output .= drupal_render_children($form);

  return $output;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.