[Koha-bugs] [Bug 33462] Force password change for new patrons entered by staff

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 19 22:33:36 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33462

--- Comment #8 from Sam Lau <samalau at gmail.com> ---
Hi all, 

I have attempted a solution for this bug and would love any feedback about what
you think! Because this is a pretty large patch I figured I'd explain more in
depth what the patch actually does here: 

I added a new column to the patron categories that determines whether that type
of patron should be forced to reset their password after being created. This
column, force_password_reset_when_set_by_staff, is defaulted to follow the new
system preference 'ForcePasswordResetWhenSetByStaff', but it also has hard
"Force" and "Don't force" options as well. 


If a patron's category allows for it, when a staff member creates a new patron
account, the password expiration date is automatically set to an expired date.
When they attempt to login to the OPAC, they are sent to a page with a custom
error message with a link to reset their password. This message is achieved by
adding a new column to the borrowers table 'needs_password_reset' which tracks
if a patron needs to reset their password after creation. Upon resetting the
password, everything proceeds as usual. 

I also wanted to mention, if testing, it goes a lot faster if you turn on the
'autoMemberNum' preference as well as turn off the 'RequireStrongPassword'
preference. This will allow for a much faster patron creation.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list