Lines 379-385
if($allDebarments) {
Link Here
|
379 |
} |
379 |
} |
380 |
} |
380 |
} |
381 |
|
381 |
|
|
|
382 |
# Lock expired patrons? |
383 |
my $days = C4::Context->preference('LockExpiredDelay'); |
384 |
if( defined $days && $days ne q{} ) { |
385 |
say "Start locking expired patrons" if $verbose; |
386 |
my $expired_patrons = Koha::Patrons->search_expired({ days => $days })->search({ login_attempts => { '!=' => -1 } }); |
387 |
my $count = $expired_patrons->count; |
388 |
$expired_patrons->lock({ remove => 1 }) if $confirm; |
389 |
if( $verbose ) { |
390 |
say $confirm ? sprintf("Locked %d patrons", $count) : sprintf("Found %d patrons", $count); |
391 |
} |
392 |
} |
393 |
|
382 |
# Handle unsubscribe requests from GDPR consent form, depends on UnsubscribeReflectionDelay preference |
394 |
# Handle unsubscribe requests from GDPR consent form, depends on UnsubscribeReflectionDelay preference |
|
|
395 |
say "Start lock unsubscribed, anonymize and delete" if $verbose; |
383 |
my $unsubscribed_patrons = Koha::Patrons->search_unsubscribed; |
396 |
my $unsubscribed_patrons = Koha::Patrons->search_unsubscribed; |
384 |
my $count = $unsubscribed_patrons->count; |
397 |
my $count = $unsubscribed_patrons->count; |
385 |
$unsubscribed_patrons->lock( { expire => 1, remove => 1 } ) if $confirm; |
398 |
$unsubscribed_patrons->lock( { expire => 1, remove => 1 } ) if $confirm; |