#480660 follow-up by c960657: unset variables, since array_slice() can cause issues on some versions of PHP.

merge-requests/26/head
Angie Byron 2009-06-06 14:51:56 +00:00
parent bccd256d2f
commit e9f8dc82b0
1 changed files with 2 additions and 1 deletions

View File

@ -260,7 +260,8 @@ function user_admin_settings() {
// Do not allow users to set the anonymous or authenticated user roles as the
// administrator role.
$roles = user_roles();
$roles = array_slice($roles, 2, NULL, TRUE);
unset($roles[DRUPAL_ANONYMOUS_RID]);
unset($roles[DRUPAL_AUTHENTICATED_RID]);
$roles[0] = t('disabled');
$form['admin_role']['user_admin_role'] = array(