Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.685 diff -u -p -r1.685 user.module --- modules/user/user.module 4 Oct 2006 06:20:38 -0000 1.685 +++ modules/user/user.module 4 Oct 2006 13:06:22 -0000 @@ -1267,8 +1267,10 @@ function user_register_submit($form_id, } function user_edit_form($uid, $edit, $register = FALSE) { + global $user; $admin = user_access('administer users'); - + $account = user_load(array('uid' => $uid)); + // Account information: $form['account'] = array('#type' => 'fieldset', '#title' => t('Account information'), @@ -1301,7 +1303,7 @@ function user_edit_form($uid, $edit, $re '#required' => TRUE, ); } - if ($admin) { + if ($admin && $account->uid != $user->uid) { $form['account']['status'] = array('#type' => 'radios', '#title' => t('Status'), '#default_value' => isset($edit['status']) ? $edit['status'] : 1, '#options' => array(t('Blocked'), t('Active'))); } if (user_access('administer access control')) { @@ -1406,7 +1408,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') && $user->uid != $account->uid) { $form['delete'] = array('#type' => 'submit', '#value' => t('Delete'), '#weight' => 31); } $form['#attributes']['enctype'] = 'multipart/form-data';