3 # Copyright 2009-2010 Kyle Hall
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
12 # Koha is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with Koha; if not, see <http://www.gnu.org/licenses>.
25 # find Koha's Perl modules
26 # test carefully before changing this
28 eval { my $lib = "$FindBin::Bin/../kohalib.pl"; require $lib };
32 use C4
::Members qw
/ DelMember /;
40 'c|confirm' => \
$confirm,
41 'v|verbose' => \
$verbose,
43 my $usage = << 'ENDUSAGE';
45 IMPORTANT
: You should
no longer call this script
. Please
use
46 cleanup_database
.pl with parameter
--del
-exp-selfreg
.
48 This script removes confirmed OPAC based patron registrations
49 that have
not been changed from the patron category specified
50 in the
system preference PatronSelfRegistrationDefaultCategory
51 within the required
time period
.
53 NOTE
: If you
do not use self registration
, do NOT run this script
.
54 If you
use self registration
, but you
do not use a temporary
55 category
for new registrations
, do NOT run this script too
.
57 This script has the following parameters
:
58 -c
--confirm
: Without this flag set
, this script will
do nothing
.
59 -h
--help
: Print this message
.
60 -v
--verbose
: Print number of removed patrons
.
64 if ( $help || !$confirm ) {
69 my $c= "$FindBin::Bin/cleanup_database.pl --del-exp-selfreg";
70 $c.= " -v" if $verbose;