function theme_user_admin_new_role in Drupal 5
Same name and namespace in other branches
- 4 modules/user.module \theme_user_admin_new_role()
- 6 modules/user/user.admin.inc \theme_user_admin_new_role()
File
- modules/
user/ user.module, line 2015 - Enables the user registration and login system.
Code
function theme_user_admin_new_role($form) {
$header = array(
t('Name'),
array(
'data' => t('Operations'),
'colspan' => 2,
),
);
foreach (user_roles() as $rid => $name) {
$edit_permissions = l(t('edit permissions'), 'admin/user/access/' . $rid);
if (!in_array($rid, array(
DRUPAL_ANONYMOUS_RID,
DRUPAL_AUTHENTICATED_RID,
))) {
$rows[] = array(
$name,
l(t('edit role'), 'admin/user/roles/edit/' . $rid),
$edit_permissions,
);
}
else {
$rows[] = array(
$name,
t('locked'),
$edit_permissions,
);
}
}
$rows[] = array(
drupal_render($form['name']),
array(
'data' => drupal_render($form['submit']),
colspan => 2,
),
);
$output = drupal_render($form);
$output .= theme('table', $header, $rows);
return $output;
}