=== modified file 'modules/user.module' --- modules/user.module +++ modules/user.module @@ -780,7 +780,7 @@ function user_menu($may_cache) { $items[] = array('path' => 'user/'. arg(1) .'/view', 'title' => t('view'), 'access' => $view_access, 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10); $items[] = array('path' => 'user/'. arg(1) .'/edit', 'title' => t('edit'), - 'callback' => 'user_edit', 'access' => $admin_access || $user->uid == arg(1), + 'callback' => 'user_edit', 'access' => ($admin_access && (arg(1) > 1)) || $user->uid == arg(1), 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'user/'. arg(1) .'/delete', 'title' => t('delete'), 'callback' => 'user_edit', 'access' => $admin_access, @@ -1357,7 +1357,7 @@ function user_edit($category = 'account' $form['_category'] = array('#type' => 'value', '#value' => $category); $form['_account'] = array('#type' => 'value', '#value' => $account); $form['submit'] = array('#type' => 'submit', '#value' => t('Submit'), '#weight' => 30); - if (user_access('administer users')) { + if (user_access('administer users') && ($account->uid != 1)) { $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'), '#weight' => 31); } $form['#attributes'] = array('enctype' => 'multipart/form-data');