View | Details | Raw Unified | Return to bug 28457
Collapse All | Expand All

(-)a/misc/cronjobs/cleanup_database.pl (-3 / +15 lines)
Lines 130-136 my $pListShareInvites; Link Here
130
my $pDebarments;
130
my $pDebarments;
131
my $allDebarments;
131
my $allDebarments;
132
my $pExpSelfReg;
132
my $pExpSelfReg;
133
if (
134
    C4::Context->preference('PatronSelfRegistrationExpireTemporaryAccountsDelay') &&
135
    C4::Context->preference('PatronSelfRegistrationExpireTemporaryAccountsDelay') > 0
136
   ){
137
    $pExpSelfReg = 1;
138
}
133
my $pUnvSelfReg;
139
my $pUnvSelfReg;
140
if (
141
    C4::Context->preference('PatronSelfRegistrationVerifyByEmail')
142
   ){
143
    #Default to 1 day expiry, which can be overriden by CLI option
144
    #FIXME: Add a system preference for specifying this value
145
    $pUnvSelfReg = 1;
146
}
134
my $fees_days;
147
my $fees_days;
135
my $special_holidays_days;
148
my $special_holidays_days;
136
my $temp_uploads;
149
my $temp_uploads;
Lines 168-174 GetOptions( Link Here
168
    'restrictions:i'    => \$pDebarments,
181
    'restrictions:i'    => \$pDebarments,
169
    'all-restrictions'  => \$allDebarments,
182
    'all-restrictions'  => \$allDebarments,
170
    'del-exp-selfreg'   => \$pExpSelfReg,
183
    'del-exp-selfreg'   => \$pExpSelfReg,
171
    'del-unv-selfreg'   => \$pUnvSelfReg,
184
    'del-unv-selfreg:1'   => \$pUnvSelfReg,
172
    'unique-holidays:i' => \$special_holidays_days,
185
    'unique-holidays:i' => \$special_holidays_days,
173
    'temp-uploads'      => \$temp_uploads,
186
    'temp-uploads'      => \$temp_uploads,
174
    'temp-uploads-days:i' => \$temp_uploads_days,
187
    'temp-uploads-days:i' => \$temp_uploads_days,
Lines 461-467 if( $pUnvSelfReg ) { Link Here
461
    if ( $confirm ) {
474
    if ( $confirm ) {
462
        DeleteUnverifiedSelfRegs( $pUnvSelfReg );
475
        DeleteUnverifiedSelfRegs( $pUnvSelfReg );
463
    } elsif ( $verbose ) {
476
    } elsif ( $verbose ) {
464
        say "unverified self-registrations may be deleted";
477
        say "unverified self-registrations may be deleted after $pUnvSelfReg days";
465
    }
478
    }
466
}
479
}
467
480
468
- 

Return to bug 28457