Browse Source

Bug 16992: [QA Follow-up] Member-password should pass an userid

If we do not fill a new userid, we should keep the old one.
Script member-password should pass that to Koha::Patron.
Otherwise things go wrong.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Without this patch, you could effectively disable a login.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
16.11.x
Marcel de Rooy 8 years ago
committed by Kyle M Hall
parent
commit
2785183a6b
  1. 2
      members/member-password.pl

2
members/member-password.pl

@ -64,7 +64,7 @@ push( @errors, 'SHORTPASSWORD' ) if ( $newpassword && $minpw && ( length($newpas
if ( $newpassword && !scalar(@errors) ) {
my $digest = Koha::AuthUtils::hash_password( $input->param('newpassword') );
my $uid = $input->param('newuserid');
my $uid = $input->param('newuserid') || $bor->{userid};
my $dbh = C4::Context->dbh;
if ( Koha::Patrons->find( $member )->update_password($uid, $digest) ) {
$template->param( newpassword => $newpassword );

Loading…
Cancel
Save