Index: user.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.admin.inc,v retrieving revision 1.30 diff -u -p -r1.30 user.admin.inc --- modules/user/user.admin.inc 19 Oct 2008 21:19:02 -0000 1.30 +++ modules/user/user.admin.inc 20 Oct 2008 03:58:54 -0000 @@ -184,6 +184,8 @@ function user_admin_account() { $form['last_access'][$account->uid] = array('#markup' => $account->access ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $account->access))) : t('never')); $form['operations'][$account->uid] = array('#markup' => l(t('edit'), "user/$account->uid/edit", array('query' => $destination))); } + // Remove uid1 from the $accounts array so it can't be accidentally deleted. + unset($accounts[1]); $form['accounts'] = array( '#type' => 'checkboxes', '#options' => $accounts Index: user.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v retrieving revision 1.22 diff -u -p -r1.22 user.pages.inc --- modules/user/user.pages.inc 13 Oct 2008 00:33:05 -0000 1.22 +++ modules/user/user.pages.inc 20 Oct 2008 03:58:55 -0000 @@ -238,7 +238,7 @@ function user_profile_form($form_state, $form['_category'] = array('#type' => 'value', '#value' => $category); $form['_account'] = array('#type' => 'value', '#value' => $account); $form['submit'] = array('#type' => 'submit', '#value' => t('Save'), '#weight' => 30); - if (user_access('administer users')) { + if (user_access('administer users') && $account->uid != 1) { $form['delete'] = array( '#type' => 'submit', '#value' => t('Delete'),