The test at line 288 of force_password_change.module assumes that the user is always required to enter their current password when changing their password. If this isn't the case, the test never passes and they are eternally forced back to their profile page.

The patch I'll attach after creating this issue addresses this by moving the check into a new user_presave hook, where validation of the new password has already occurred and we just need to check that the password is the field that has changed.

Comments

NigelCunningham created an issue. See original summary.

nigelcunningham’s picture

nigelcunningham’s picture

Status: Active » Needs review
StatusFileSize
new3.06 KB

Missed including the use when cleaning up the commit.

nigelcunningham’s picture

Add a check that $user->original is actually set - the hook can be triggered for a new user too.

larisse’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

This still a problem in 2.0.x version?

laisbonafe’s picture

Status: Needs review » Needs work
StatusFileSize
new101.05 KB

If the admin don't create a password for the new user . the function force password in the first login don't have been enable, in this case the new user should be create the password for the link is send in email, if the admin creat a password for the new user, the admin should be send the password created for the user, befor enable the function force password in the first login. The module is working well i just think need a more informaion about this functionality (force password in firsr login).

laisbonafe’s picture

Status: Needs work » Needs review
StatusFileSize
new674 bytes

I did a patch for create more informations about the functionality (force password change in first login).

  • larisse committed 0006d49 on 2.0.x authored by laisbonafe
    Issue #3160663 by NigelCunningham, laisbonafe, larisse: Per user flag...
larisse’s picture

Status: Needs review » Fixed

@laisbonafe is right. The Force password change on first-time login have to be enabled when the admin set a password for the user and the user know this password.

I think this issue can be related with this other issue #2922398: Unable to reset my password.

Status: Fixed » Closed (fixed)

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