Commit e3a6372c authored by catch's avatar catch
Browse files

Revert "Any user should not be allowed to block his/her own account"

This reverts commit 1ab05706.
parent 4051603c
......@@ -1030,7 +1030,7 @@ function user_account_form(&$form, &$form_state) {
'#title' => t('Status'),
'#default_value' => $status,
'#options' => array(t('Blocked'), t('Active')),
'#access' => $admin && ($user->uid != $account->uid),
'#access' => $admin,
);
$roles = array_map('check_plain', user_roles(TRUE));
......
......@@ -1268,11 +1268,6 @@ class UserAdminTestCase extends DrupalWebTestCase {
$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.
$this->drupalLogin($admin_user);
$this->drupalGet('user/' . $admin_user->uid . '/edit');
$this->assertNoFieldByName('status', 0, t('Radio button to block own account was not found.'));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment