After http://drupal.org/node/165358, we still regenerate the session when changing the password of another user. Granted, changing a password for another user doesn't occur that much.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Heine’s picture

Status: Active » Needs review
drumm’s picture

Version: 5.x-dev » 7.x-dev
Status: Needs review » Reviewed & tested by the community
FileSize
676 bytes

Still applies to 5.x and even 6.x, but needs to be committed to HEAD and backported. Attached is the 6.x version. It is a straightforward update and looks good, so marking RTBC.

alexanderpas’s picture

Priority: Normal » Critical

this bug affects all tests that'll try so do something as the root user admin.
this (example) test gives WSOD due to this bug.

class UserRootAdminLoginTestCase extends DrupalWebTestCase {
  function getInfo() {
    return array(
      'name' => t('Login as root admin'),
      'description' => t('Tries to login as root admin.'),
      'group' => t('User')
    );
  }

  /**
   * Try logging in as root administrator
   */
  function testRootAdminLogin() {
    // generate a password for the user
    $password = user_password();
    $root_admin = user_save(user_load(1), array('pass' => $password));

    // Add the raw password so that we can log in as this user.
    $root_admin->pass_raw = $password;

    // login as the root administrator
    $this->drupalLogin($root_admin);
  }
}
Dries’s picture

Version: 7.x-dev » 6.x-dev

Committed to CVS HEAD. Updating version to Drupal 6.

Darren Oh’s picture

FileSize
657 bytes

The original patch works for Drupal 6, but I generated one from Drupal 6 because we really need this to make tests work.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Looks good, committed to 6.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.