When the user is forced to change the password and submits the new password, the form validation fails and shows "Your current password is missing or incorrect".

Comments

aohrvetpv’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for the report and patch, but I am unable to reproduce this so far. For your site, what is the path of the page where the user is forced to change their password?

The module has tests to ensure that forced password changes work without error (e.g., testSingleError()), so this must be working for some configurations. I am wondering if the difference in variables to unset is due to some difference in your password change page.

drikc’s picture

I'm facing this problem and the patch in #0 fix the issue.

The page path where the user is forced to change its password is the following: user/<uid>/password

I'm not sure the test case is covering this correctly as it user a different path (user/<uid>/edit), here is the code for testSingleUser() method (near line 462):

    // Attempt to change password.
    $edit = array(
      'mail' => $user->mail,
      'pass[pass1]' => 'random_string',
      'pass[pass2]' => 'random_string',
    );

    $this->drupalPost("user/$user->uid/edit", $edit, t('Save'));
    $this->assertRaw(t('The changes have been saved.'), t('Password change successful.'));
drikc’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new768 bytes

Re-do the patch in #0 to be relative to the module root.

Status: Needs review » Needs work

The last submitted patch, 3: current_password-2426317-3.patch, failed testing.

aohrvetpv’s picture

Version: 7.x-1.10 » 7.x-2.x-dev
Assigned: Unassigned » aohrvetpv
Status: Needs work » Active

Thanks. The user/<uid>/password path is used by the 'Password change tab' module, so I suspect this problem occurs only when that module is enabled. Will try to fix.

aohrvetpv’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

wrong version

aohrvetpv’s picture

Status: Active » Needs review
StatusFileSize
new736 bytes

Confirmed problem and this patch seems to fix. Please test.

drikc’s picture

I confirme #7 patch fixes.

Thanks

vadimk’s picture

Thanks. It looks good.

  • AohRveTPV committed fc30fa1 on 7.x-1.x
    Issue #2426317 by AohRveTPV, drikc, madalien: Missing current password
    
aohrvetpv’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Status: Needs review » Patch (to be ported)
aohrvetpv’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Patch (to be ported) » Active

Bug does not look to exist in 6.x-1.x.

Leaving open for now, until tests added to ensure no regressions.

abarpetia’s picture

Thanks for #7 patch. It worked perfectly for me.

aohrvetpv’s picture

Title: Missing current password » Missing current password with Password Change Tab
aohrvetpv’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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