From fbc4e94d7f389d6bac37d9145283239d872f82f5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sat, 11 Oct 2014 22:43:52 +0200 Subject: [PATCH] Bug 11945: The script should die if the pref are not filled If the 2 prefs are not defined, the script should die. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- misc/cronjobs/delete_expired_opac_registrations.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/cronjobs/delete_expired_opac_registrations.pl b/misc/cronjobs/delete_expired_opac_registrations.pl index 7a24d47d02..b88b9b6fc9 100755 --- a/misc/cronjobs/delete_expired_opac_registrations.pl +++ b/misc/cronjobs/delete_expired_opac_registrations.pl @@ -69,6 +69,9 @@ my $delay = my $category_code = C4::Context->preference('PatronSelfRegistrationDefaultCategory'); +die "PatronSelfRegistrationExpireTemporaryAccountsDelay and PatronSelfRegistrationDefaultCategory should be filled to use this script!" + if not $category_code or not defined $delay or $delay eq q||; + my $query = " SELECT borrowernumber FROM borrowers -- 2.39.5