Doing a query on nearly every single init is a performance concern. It's not testing if user is logged in also.
Patch adds a variable check to suppress the query.
| Comment | File | Size | Author |
|---|---|---|---|
| expire_password.patch | 1.82 KB | hefox |
Doing a query on nearly every single init is a performance concern. It's not testing if user is logged in also.
Patch adds a variable check to suppress the query.
| Comment | File | Size | Author |
|---|---|---|---|
| expire_password.patch | 1.82 KB | hefox |
Comments
Comment #1
jaypanThat patch looks good. I'll play with it a bit next week and if everything looks good, I'll add it in to the module. Thank you for the patch.
Comment #2
jaypanComment #3
jaypanI've added this to version 3.1. I made a couple small changes though:
1) I set the default for 'enable password expiration' to 'TRUE' so as not to break the functionality on sites where people have password expiration set. If the default were FALSE, and someone updated to the newest version of code without checking their settings, their passwords would no longer expire and they may not realize.
2) I added the variable_set() code to the settings page submit function. You had added it to the form, but it wasn't saved anywhere. I am not returning system_settings_form() on the settings page (because of some calculations that need to be made in the submit function), so this had to be explicitly added.
Thank you for the patch, and for coming up with a way to slim down the code/footprint a little.
Comment #4
jaypan