Skip to content

Avoid SQL queries when password is not expired

Heinrich Lee Yu requested to merge optimize-check-password-expiration into master

What does this MR do and why?

Rearranges the conditionals so that we do the cheaper check first and avoid querying the database most of the time.

This method is called on every HTML page load so it saves us a lot of queries across all requests.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Heinrich Lee Yu

Merge request reports