Lines 400-406
if($allDebarments) {
Link Here
|
400 |
} |
400 |
} |
401 |
} |
401 |
} |
402 |
|
402 |
|
|
|
403 |
# Lock expired patrons? |
404 |
my $days = C4::Context->preference('LockExpiredDelay'); |
405 |
if( defined $days && $days ne q{} ) { |
406 |
say "Start locking expired patrons" if $verbose; |
407 |
my $expired_patrons = Koha::Patrons->search_expired({ days => $days })->search({ login_attempts => { '!=' => -1 } }); |
408 |
my $count = $expired_patrons->count; |
409 |
$expired_patrons->lock({ remove => 1 }) if $confirm; |
410 |
if( $verbose ) { |
411 |
say $confirm ? sprintf("Locked %d patrons", $count) : sprintf("Found %d patrons", $count); |
412 |
} |
413 |
} |
414 |
|
403 |
# Handle unsubscribe requests from GDPR consent form, depends on UnsubscribeReflectionDelay preference |
415 |
# Handle unsubscribe requests from GDPR consent form, depends on UnsubscribeReflectionDelay preference |
|
|
416 |
say "Start lock unsubscribed, anonymize and delete" if $verbose; |
404 |
my $unsubscribed_patrons = Koha::Patrons->search_unsubscribed; |
417 |
my $unsubscribed_patrons = Koha::Patrons->search_unsubscribed; |
405 |
my $count = $unsubscribed_patrons->count; |
418 |
my $count = $unsubscribed_patrons->count; |
406 |
$unsubscribed_patrons->lock( { expire => 1, remove => 1 } ) if $confirm; |
419 |
$unsubscribed_patrons->lock( { expire => 1, remove => 1 } ) if $confirm; |