$verification_token = md5_hex( time().{}.rand().{}.$$ );
}
- $borrower{password} = Koha::AuthUtils::generate_password unless $borrower{password};
+ $borrower{password} = Koha::AuthUtils::generate_password unless $borrower{password};
$borrower{verification_token} = $verification_token;
Koha::Patron::Modification->new( \%borrower )->store();
$template->param( OpacPasswordChange =>
C4::Context->preference('OpacPasswordChange') );
+ $borrower{categorycode} ||= C4::Context->preference('PatronSelfRegistrationDefaultCategory');
+ $borrower{password} ||= Koha::AuthUtils::generate_password;
my $patron = Koha::Patron->new( \%borrower )->store;
if ( $patron ) {
C4::Members::Attributes::SetBorrowerAttributes( $patron->borrowernumber, $attributes );
);
}
- $template->param( password_cleartext => $password );
+ $template->param( password_cleartext => $patron->plain_text_password );
$template->param( borrower => $patron->unblessed );
} else {
# FIXME Handle possible errors here