Bug 33832: Allow updating username without changing password on member-password.pl
authorBrendan Lawlor <blawlor@clamsnet.org>
Fri, 12 Apr 2024 15:29:37 +0000 (15:29 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 23 May 2024 13:53:27 +0000 (13:53 +0000)
commit20432371997c27c50dce447d2ecd6a761608da4b
tree5c6a60f54029e84b4fcf4e328e5abb7b48957a3b
parentb7aa395b6b9be134267baad6270bb459c9042443
Bug 33832: Allow updating username without changing password on member-password.pl

This patch updates the change password page on the staff interface to
allow for changing the patron's username without changing the password.
If the new password is an empty string we can skip setting the patron's
password and sending the new password to the template.

Test plan:
1. From a patron record tool bar click 'Change password'
2. Notice that if you try to change the user's name without also
   changing the password the page just reloads and nothing happens
3. Apply patch and restart_all
4. From the patron record click 'Change password' again
5. Set the user's new username and  password eg. '1234Abc' and click
   'Save'
6. Confirm that you can log in to the OPAC with the user
7. Return to the patron record and click 'Change password' again
8. This time change just the 'New username field' and click 'Save'
6. Notice that the username is updated
7. Confirm you can log into the OPAC with the new username and the
   original password '1234Abcd'
8. Make sure that the change password form still validates passwords
   for length and matching errors etc

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e26fc0a3d5a83a7b22f0c3907a98d470b0e2443d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 34e17b5abad1bac29bc13155cedbe11b7d7fc1ba)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
members/member-password.pl