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>
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 );