Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.963 diff -u -p -r1.963 user.module --- modules/user/user.module 9 Feb 2009 07:36:15 -0000 1.963 +++ modules/user/user.module 17 Feb 2009 20:44:22 -0000 @@ -2221,6 +2221,10 @@ function user_multiple_cancel_confirm_su foreach ($form_state['values']['accounts'] as $uid => $value) { // Prevent user administrators from deleting themselves without confirmation. if ($uid == $user->uid) { + // Prevent uid 1 from deleting himself. + if ($uid <= 1) { + continue; + } $admin_form_state = $form_state; unset($admin_form_state['values']['user_cancel_confirm']); $admin_form_state['values']['_account'] = $user; Index: modules/user/user.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.pages.inc,v retrieving revision 1.28 diff -u -p -r1.28 user.pages.inc --- modules/user/user.pages.inc 3 Feb 2009 17:30:13 -0000 1.28 +++ modules/user/user.pages.inc 17 Feb 2009 20:34:33 -0000 @@ -246,7 +246,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 (($account->uid == $user->uid && user_access('cancel account')) || user_access('administer users')) { + if ((($account->uid == $user->uid && user_access('cancel account')) || user_access('administer users')) && $user->uid > 1) { $form['cancel'] = array( '#type' => 'submit', '#value' => t('Cancel account'),