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

(-)a/installer/data/mysql/atomicupdate/bug_25090-add_PatronSelfRegistrationVerifyByEmailToLibrary_and_PatronSelfRegistrationVerifyByEmailToPatron_sysprefs.perl (+21 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    my $sth = $dbh->prepare("SELECT value from systempreferences WHERE variable='PatronSelfRegistrationVerifyByEmail'");
4
    $sth->execute;
5
    my ($value) = $sth->fetchrow;
6
7
    $dbh->do(q{
8
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PatronSelfRegistrationVerifyByEmailToPatron', '$value', NULL, 'If enabled, any patron attempting to register themselves via the OPAC will will receieve an email requiring him or her to verify themselves via email to activate their account', 'YesNo');
9
    });
10
11
    $dbh->do(q{
12
        DELETE FROM systempreferences WHERE variable='PatronSelfRegistrationVerifyByEmail';
13
    });
14
15
    $dbh->do(q{
16
        INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PatronSelfRegistrationVerifyByEmailToLibrary', '0', '0|BranchEmailAddress|KohaAdminEmailAddress', 'If enabled, when a patron attempts to register themselves via the OPAC a verification email will be sent to the library to approve the activation of the patron account.', 'Choice');
17
    });
18
19
    SetVersion( $DBversion );
20
    print "Upgrade to $DBversion done (Bug 25090 - Add two new sysprefs PatronSelfRegistrationVerifyByEmailToPatron and PatronSelfRegistrationVerifyByEmailToLibrary so libraries have option to moderate which registrations get Koha accounts)\n";
21
}
(-)a/installer/data/mysql/sysprefs.sql (-1 / +2 lines)
Lines 496-502 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
496
('PatronSelfRegistrationExpireTemporaryAccountsDelay','0',NULL,'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.','Integer'),
496
('PatronSelfRegistrationExpireTemporaryAccountsDelay','0',NULL,'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.','Integer'),
497
('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'),
497
('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'),
498
('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self registered','YesNo'),
498
('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self registered','YesNo'),
499
('PatronSelfRegistrationVerifyByEmail','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate his or her account.','YesNo'),
499
('PatronSelfRegistrationVerifyByEmailToLibrary', '0', '0|BranchEmailAddress|KohaAdminEmailAddress', 'If enabled, when a patron attempts to register themselves via the OPAC a verification email will be sent to the library to approve the activation of the patron account.', 'Choice'),
500
('PatronSelfRegistrationVerifyByEmailToPatron','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will will receieve an email requiring him or her to verify themselves via email to activate their account','YesNo'),
500
('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'),
501
('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'),
501
('EnablePayPalOpacPayments',  '0', NULL ,  'Enables the ability to pay fees and fines from  the OPAC via PayPal',  'YesNo' ),
502
('EnablePayPalOpacPayments',  '0', NULL ,  'Enables the ability to pay fees and fines from  the OPAC via PayPal',  'YesNo' ),
502
('PatronQuickAddFields',  '', NULL ,  'A list of fields separated by "|" to be displayed along with mandatory fields in the patron quick add form if chosen at patron entry',  'Free' ),
503
('PatronQuickAddFields',  '', NULL ,  'A list of fields separated by "|" to be displayed along with mandatory fields in the patron quick add form if chosen at patron entry',  'Free' ),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-3 / +11 lines)
Lines 821-832 OPAC: Link Here
821
            - "library patrons to register or modify their account via the OPAC."
821
            - "library patrons to register or modify their account via the OPAC."
822
            - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code."
822
            - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code."
823
        -
823
        -
824
            - pref: PatronSelfRegistrationVerifyByEmail
824
            - pref: PatronSelfRegistrationVerifyByEmailToPatron
825
              choices:
825
              choices:
826
                  yes: Require
826
                  yes: Require
827
                  no: "Don't require"
827
                  no: "Don't require"
828
            - "that a self-registering patron verify themselves via email."
828
            - "that a self-registering patron verify themselves via email."
829
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
829
830
            - "<p>Enable librarian verification of OPAC self registrations by sending verification email to"
831
            - pref: PatronSelfRegistrationVerifyByEmailToLibrary
832
              default: 0
833
              choices:
834
                  0: None
835
                  BranchEmailAddress: email address of branch
836
                  KohaAdminEmailAddress: KohaAdminEmailAddress
837
            - "for a librarian to approve activation of Koha account.</p>"
838
            - "<br><strong>NOTE:</strong> Both of these system preferences requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
830
        -
839
        -
831
            - "Use the patron category code"
840
            - "Use the patron category code"
832
            - pref: PatronSelfRegistrationDefaultCategory
841
            - pref: PatronSelfRegistrationDefaultCategory
833
- 

Return to bug 25090