Editing another user's password does not update reset state

Created on 25 May 2018, about 6 years ago
Updated 7 April 2024, 3 months ago

Problem/Motivation

Observed behavior

  • A user account's password has been marked as expired.
  • A different user with 'administer users' permission edits their account to change their password via the user edit form (editing nothing else).
  • The password is changed but the last password reset date and the expiry state isn't changed.

Expected behavior

  • A user account's password has been marked as expired.
  • A different user with 'administer users' permission edits their account to change their password via the user edit form (editing nothing else).
  • The password is changed andthe last password reset date and the expiry state are changed.

Proposed resolution

Change the conditional in _password_policy_user_profile_form_submit to also update the state of the two fields if editing another user. Note that the $current_pass variable will be NULL, which is why it's not working at the moment.

Remaining tasks

Decide if the 'Expected behavior' described above is correct.
Work this through, along with #2947985: Discussion for "bypass password policies" permission β†’ .

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs review

Version

4.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom Steven Jones

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024