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>
(cherry picked from commit d331c7aba8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
parent
8943833fb1
commit
768f2a4882
|
|
@ -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