Open NJahreis opened 1 month ago
Hallo @NJahreis
Thank you for your report. We are aware of that bug now, should be fixed quite in time. However, perhaps you find some time to send pull request for that finding? Would be happy for your contribution.
Thanks for your help, feedback and contribution ;-)
LG Wolfgang
Describe the bug If _theme_boostunion | footersuppresslogininfo is set to true the
function user_count_login_failures($user, $reset = true)
(https://github.com/moodle/moodle/blob/462d5f04a8fea5e2aaa7911cc700f90d54b8a73b/user/lib.php#L699-L714) is never called with the reset flag set to true. If additionally the core option core | displayloginfailures is turned on the displayed number of login failures in the header is always shown on all pages.To Reproduce Steps to reproduce the behavior:
Expected behavior The number of failed login attempts should only be displayed on the first page visited after login.
Screenshots Screenshot of the displayed message.![image](https://github.com/moodle-an-hochschulen/moodle-theme_boost_union/assets/63058688/84161557-1d5f-40ab-9400-5d46ff882f4d)
Additional context The only function call reseting the number of failed login attempts in moodle core using
user_count_login_failures
is in the functioncore_renderer::login_info
(https://github.com/moodle/moodle/blob/main/lib/outputrenderers.php#L1126-L1226) which as far as I can tell is normally only called in the footer.mustache files. Thus deactivating the login info in the footer removes the reset.