Avoid SQL queries when password is not expired
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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Heinrich Lee Yu