? 920250.patch
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.1230
diff -u -p -r1.1230 user.module
--- modules/user/user.module	12 Jan 2011 23:01:51 -0000	1.1230
+++ modules/user/user.module	16 Jan 2011 11:10:39 -0000
@@ -1084,6 +1084,7 @@ function user_account_form(&$form, &$for
     '#default_value' => $status,
     '#options' => array(t('Blocked'), t('Active')),
     '#access' => $admin,
+    '#disabled' => $user->uid == $account->uid,
   );
 
   $roles = array_map('check_plain', user_roles(TRUE));
Index: modules/user/user.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.test,v
retrieving revision 1.111
diff -u -p -r1.111 user.test
--- modules/user/user.test	18 Dec 2010 00:56:18 -0000	1.111
+++ modules/user/user.test	16 Jan 2011 11:10:41 -0000
@@ -1238,6 +1238,12 @@ class UserAdminTestCase extends DrupalWe
     $account1 = user_load($user_d->uid, TRUE);
     $this->assertEqual($account1->status, 1, 'User D unblocked');
     $this->assertMail("to", $account1->mail, "Activation mail sent to user D");
+
+    // Test that a user cannot block their own account (See #920250)
+    $this->drupalLogin($admin_user);
+    $this->drupalGet('user/' . $admin_user->uid . '/edit');
+    $element = $this->xpath('//input[@id="edit-status-0" and @disabled="disabled"]');
+    $this->assertEqual(count($element), 1, t('Radio button to block own account is disabled.'));
   }
 }
 
