Closed (fixed)
Project:
Password Policy
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Sep 2010 at 18:08 UTC
Updated:
15 Feb 2012 at 20:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
csurocker commentedStill looking for possible options any help on that....
Comment #2
deekayen commentedComment #3
erikwebb commentedA bit late now, but any update?
Comment #4
mojzis commentedi think i have run into a similar issue. i have two sites almost identical in setup, it works on one and doesnt work in other. the force_password_change value is 1 in database (user.data), but when i try dpm(user_load()), this variable is on 0 . Any suggestions would be highly appreciated :) thanks.
Comment #5
mojzis commentedscenario :
i think all this is because of this piece of code (function password_policy_user) :
it sounds to me that it is somehow assumed , that the first change is done by the user herself. I guess adding a check for that could help (&& $user->uid == $account->uid.
I am not sure thogh how it was ment, if someone confirms i can make a patch.
Comment #6
erikwebb commentedHere's my pass at a change. What I think really should be checked is that a user, more specifically than just updating their profile, is updating their password specifically. This should take care of that change.
Comment #7
deekayen commentedcommitted
Comment #8
deekayen commentedI ported the patch to 7.x-1.x branch.
Comment #10
matt v. commentedI recently updated the tests for Drupal 7. For more recent versions of Drupal, the test to check whether an administrator could force their own account to require a password change is failing.
The issue appears to be related to the port of this patch committed in Comment #8 above. From what I can tell, the steps necessary to check whether a password has been updated changed a bit between Drupal 7.0 and 7.1 due to #999004: user_save() relies on $edit instead of $account.
I'm attaching a patch that fixes the issue, by comparing the current and original passwords associated with the account when deciding whether to toggle the force_change field off. This fixes the one currently remaining failing test.
Comment #11
deekayen commentedCommitted