Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Are there any plans to add an additional config option to the password expiration form to disable the expiration functionality?
This is a really great module and this flexibility would be really useful for me.
Comments
Comment #1
coltranePatch adds 'expire_enabled' config option checkbox that when checked uses #states to show the other options. Test for this coming soon from #2145649
Here's what it looks like prior to enabling https://www.monosnap.com/image/7bchJJZoNOUrvhxG3bTvqIv49
Edit: this functionality was actually already available by setting the expire_limit option to "0" but that's not super clear or usable IMO.
Comment #2
8ballsteve CreditAttribution: 8ballsteve commentedHi coltrane - looks great, exactly what i was hoping for.
Think it would be best to also validate the expire enabled flag on cron though:
Suggest adding the below to the cron function in expire.inc:
Comment #3
8ballsteve CreditAttribution: 8ballsteve commentedHave rerolled the patch including my suggestion - additionally have added the enabled check to the init function before the user load, might save some load time?
Comment #4
erikwebb CreditAttribution: erikwebb commentedTo ensure this functionality works as expected, can we add a test for with and without this enabled?
Comment #5
8ballsteve CreditAttribution: 8ballsteve commentedI haven't written a great deal of test cases so please feel free to adjust this if not correct.
Patch with tests attached.
Thanks!
Comment #6
erikwebb CreditAttribution: erikwebb commentedComment #7
erikwebb CreditAttribution: erikwebb commented@8ballsteve -
It will likely be easier to maintain if you wrap all of those fields into a container, so that we only have to declare the #states property once.
Also, the test should test the effect of actually using an expiration value, not just the policy creation.
Comment #8
AohRveTPV CreditAttribution: AohRveTPV commented- Add update code.
- Extend
testExpire()
to test this setting.- Add container for controls that should only be visible when enabled (per #7).
- Change expire fieldset to be collapsed based on enabled setting rather than limit.
- Change default expire limit to "6 months". (My guess is that 6 months is more typical, and that 3 months is relatively quick.)
Comment #9
AohRveTPV CreditAttribution: AohRveTPV commentedWrong patch file in previous comment.
Comment #11
AohRveTPV CreditAttribution: AohRveTPV commentedRemove unused variable.
Comment #13
AohRveTPV CreditAttribution: AohRveTPV commentedPrevious patch was incorrectly updated to apply on latest code.
Comment #15
AohRveTPV CreditAttribution: AohRveTPV commented