Bug 40744: Ignore --del-exp-selfreg if pref is not set
If PatronSelfRegistration we should ignore (i.e. do nothing) if --del-exp-selfreg is passed to cleanup_database.pl It prevents the script to warn that the pref is not set. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
parent
e70e6a233e
commit
d331c7aba8
|
|
@ -524,7 +524,7 @@ if ($verbose) {
|
|||
say $confirm ? sprintf( "Deleted %d patrons", $count ) : sprintf( "%d patrons would have been deleted", $count );
|
||||
}
|
||||
|
||||
if ($pExpSelfReg) {
|
||||
if ( $pExpSelfReg && C4::Context->preference('PatronSelfRegistration') ) {
|
||||
try {
|
||||
my $opac_registrations = Koha::Patrons->search->filter_by_expired_opac_registrations->filter_by_safe_to_delete;
|
||||
my $count = $opac_registrations->count;
|
||||
|
|
|
|||
Loading…
Reference in New Issue