https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40545 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185850|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186231 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186231&action=edit Bug 40545: Add utility script for resetting 2FA settings This adds a command-line utility script that allows administrators to reset a patron's two-factor authentication settings when they lose access to their authenticator device. The script uses the new Koha::Patron methods and provides: * Parameter validation (mutually exclusive userid/cardnumber/patron_id) * User-friendly error messages and feedback * Verification that patron has 2FA enabled before attempting reset To test: 1. Enable TwoFactorAuthentication system preference 2. Set up 2FA for a test patron 3. Run: $ ktd --shell k$ perl misc/admin/reset_2fa.pl --userid <userid> => SUCCESS: Script resets 2FA and shows confirmation message 4. Verify patron can log in with password only 5. Test error cases: - No parameters: shows usage message - Multiple parameters: shows mutual exclusivity error - Non-existent user: shows user not found error - User without 2FA: shows informational message => SUCCESS: All scenarios work as expected 6. Sign off :-D Sponsored-by: ByWater Solutions Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.