Kyle M Hall
92782d3832
This development will add the ability for a new patron to register himself or herself. The self-registration will attempt to match this newly inputted data to any existing patrons and if any possible matches are found, ask if the patron is sure he or she doesn't already have an account at the library. A system preference may be set to prevent patron self-registration if the system detects the possibility that the person may already have an account. Once the patron has registered, passing a captcha (or similar bot-stopper), the patron will then be optionally verified a second time via email. At this point, the patron will be able to print a temporary library card (optional by system preference), and will be provided any details necessary to access electronic resources (this body of text would be a template in the slips and notices system). At the library's choice, this new patron would either be set to a temporary patron status (patron type set via system preference), or a fully-fledged patron (allow patron type to be determined by age and/or other attributes). Assuming the library uses temporary patron types for OPAC registrations, this patron will next enter a queue and would need to physically enter the library to verify himself and become a fully-fledged patron (most likely by bringing in physical proof of address, etc.). The librarian would look up the patron record and modify the patron type. If a temporary patron has not been verified within a certain time frame (defined by a system preference), the patron record will be deleted from the system via a cron job. For registered patrons, the system will allow each person to also update his or her personal data via the OPAC. When a patron updates his or her information, the changes will be entered into a queue to be verified by a librarian (preventing a patron from inputting obviously bogus data). The staff client home page will display the number of patron records with changes awaiting approval. A librarian would then be able to click through a list of modification requests, and approve or deny each (with approval and denial alerts being sent to the patron via the standard messaging system). NEW SYSTEM PREFERENCES * PatronSelfRegistration * PatronSelfRegistrationDetectDuplicates * PatronSelfRegistrationVerifyByEmail * PatronSelfRegistrationPrintTemporaryCard * PatronSelfRegistrationUseTemporaryStatus * PatronSelfRegistrationExpireTemporaryAccountsDelay NEW NOTICE * Verify by email notice NEW SLIP * Temporary card slip NEW CRON JOB * delete_expired_opac_registrations.pl - Deletes patrons that have not been upgraded from the temporary status within the specified delay * delete_unverified_opac_registrations.pl - Deletes the unverified patrons based on the length of time specified in the PatronSelfRegistrationExpireTemporaryAccountsDelay The patron will register from self_registration.pl, linked off opac-main.pl if enabled. The registration page will be translatable to other languages in the same way that existing templates are. Test Plan: 1) Enable PatronSelfRegistration 2) Set PatronSelfRegistrationExpireTemporaryAccountsDelay to a number of days 3) Create a self-registered borrower category 4) Set PatronSelfRegistrationUseTemporaryStatus 5) Set PatronSelfRegistrationVerifyByEmail to "Don't require" 6) Go to OPAC, log out if logged in. 7) You should see the "Register here" link below the login box 8) Attempt to register yourself 9) Verify you can log in with your temporary password. 10) Set PatronSelfRegistrationVerifyByEmail to "Require" 11) Attempt another self-registration 12) Check the messages table, you should see a new message with a verification link. 13) Copy and paste the link into a web browser to verify the registration 14) Log in with the given credentials to verify the account was created. Test Plan - Part 2 - Borrower Modifications 1) Log in to OPAC, go to "my personal details" tab. 2) Make some modifications to your details. 3) Repeat steps 1 and 2 for two more borrowers. 4) Log in to Koha intranet with a user that can modify borrowers. 5) At the bottom of mainpage.pl, you should see: Patrons requesting modifications: 3 6) Click the link 7) Approve one change, deny a different one, and ignore the third, then submit. 8) Check the records, you should see the changes take affect on the approved one, and no changes to the other two. You should also see "Patrons requesting modifications: 1" at the bottom of mainpage.pl now. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Bug 7067 - OPAC Borrower Self Registration - Followup * Rename PatronSelfRegistrationUseTemporaryStatus to PatronSelfRegistrationDefaultCategory * Hide register link unless PatronSelfRegistrationDefaultCategory is set. * Add invalid token page * Add documentation and switches to cron scripts * Add required fields check for editing exiting patrons * Don't force require email address for existing patrons when PatronSelfRegistrationVerifyByEmail is enabled. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Passed-QA-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
79 lines
2.4 KiB
Perl
Executable file
79 lines
2.4 KiB
Perl
Executable file
#!/usr/bin/perl
|
|
|
|
# Copyright Paul Poulain 2002
|
|
# Parts Copyright Liblime 2007
|
|
#
|
|
# This file is part of Koha.
|
|
#
|
|
# Koha is free software; you can redistribute it and/or modify it under the
|
|
# terms of the GNU General Public License as published by the Free Software
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
# version.
|
|
#
|
|
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License along
|
|
# with Koha; if not, write to the Free Software Foundation, Inc.,
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
use strict;
|
|
use warnings;
|
|
use CGI;
|
|
use C4::Output;
|
|
use C4::Auth;
|
|
use C4::Koha;
|
|
use C4::NewsChannels;
|
|
use C4::Review qw/numberofreviews/;
|
|
use C4::Suggestions qw/CountSuggestion/;
|
|
use C4::Tags qw/get_count_by_tag_status/;
|
|
use Koha::Borrower::Modifications;
|
|
|
|
my $query = new CGI;
|
|
|
|
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
|
|
{
|
|
template_name => "intranet-main.tmpl",
|
|
query => $query,
|
|
type => "intranet",
|
|
authnotrequired => 0,
|
|
flagsrequired => { catalogue => 1, },
|
|
}
|
|
);
|
|
|
|
my $all_koha_news = &GetNewsToDisplay("koha");
|
|
my $koha_news_count = scalar @$all_koha_news;
|
|
|
|
$template->param(
|
|
koha_news => $all_koha_news,
|
|
koha_news_count => $koha_news_count
|
|
);
|
|
|
|
my $branch =
|
|
C4::Context->preference("IndependantBranches")
|
|
&& !$flags->{'superlibrarian'}
|
|
? C4::Context->userenv()->{'branch'}
|
|
: undef;
|
|
|
|
my $pendingcomments = numberofreviews(0);
|
|
my $pendingtags = get_count_by_tag_status(0);
|
|
my $pendingsuggestions = CountSuggestion("ASKED");
|
|
my $pending_borrower_modifications =
|
|
Koha::Borrower::Modifications->GetPendingModificationsCount( $branch );
|
|
|
|
$template->param(
|
|
pendingcomments => $pendingcomments,
|
|
pendingtags => $pendingtags,
|
|
pendingsuggestions => $pendingsuggestions,
|
|
pending_borrower_modifications => $pending_borrower_modifications,
|
|
);
|
|
|
|
#
|
|
# warn user if he is using mysql/admin login
|
|
#
|
|
unless ($loggedinuser) {
|
|
$template->param(adminWarning => 1);
|
|
}
|
|
|
|
output_html_with_http_headers $query, $cookie, $template->output;
|