use Koha::CirculationRules;
#Setting variables
-my $input = new CGI;
+my $input = CGI->new;
unless ( C4::Context->preference('Version') ) {
print $input->redirect("/cgi-bin/koha/installer/install.pl");
my $secondpassword = $input->param('password2') || '';
my $cardnumber = $input->param('cardnumber');
my $userid = $input->param('userid');
+ my $categorycode = $input->param('categorycode_entry');
+ my $patron_category =
+ Koha::Patron::Categories->find( $categorycode );
+
+ my ( $is_valid, $passworderror ) =
+ Koha::AuthUtils::is_password_valid( $firstpassword,
+ $patron_category );
- my ( $is_valid, $passworderror) = Koha::AuthUtils::is_password_valid( $firstpassword );
if ( my $error_code = checkcardnumber($cardnumber) ) {
if ( $error_code == 1 ) {
firstname => scalar $input->param('firstname'),
cardnumber => scalar $input->param('cardnumber'),
branchcode => scalar $input->param('libraries'),
- categorycode => scalar $input->param('categorycode_entry'),
+ categorycode => $categorycode,
userid => scalar $input->param('userid'),
privacy => "default",
address => "",
flags => 1, # Will be superlibrarian
};
- my $patron_category =
- Koha::Patron::Categories->find( $patron_data->{categorycode} );
$patron_data->{dateexpiry} =
$patron_category->get_expiry_date( $patron_data->{dateenrolled} );
rentaldiscount => 0,
reservesallowed => $reservesallowed,
suspension_chargeperiod => undef,
+ decreaseloanholds => undef,
}
};
template_name => "onboarding/onboardingstep${step}.tt",
query => $input,
type => "intranet",
- debug => 1,
}
);