Index: user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user.module,v retrieving revision 1.380 diff -u -r1.380 user.module --- user.module 22 Aug 2004 17:03:41 -0000 1.380 +++ user.module 25 Aug 2004 09:39:28 -0000 @@ -1092,7 +1092,7 @@ } } else if ($_POST['op'] == t('Delete account')) { - if ($account->status == 0) { + if ($account->status == 0 && !($account->uid==1)) { db_query('DELETE FROM {users} WHERE uid = %d', $account->uid); db_query('DELETE FROM {users_roles} WHERE uid = %d', $account->uid); db_query('DELETE FROM {authmap} WHERE uid = %d', $account->uid); @@ -1101,6 +1101,9 @@ print theme('page', user_admin_account()); drupal_goto('admin/user'); } + elseif($account->uid==1) { + drupal_set_message(t('Failed to delete account: the account belongs to the superuser or root administrator, and cannot be deleted.'), 'error'); + } else { drupal_set_message(t('Failed to delete account: the account has to be blocked first.'), 'error'); }