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/mandatory/sysprefs.sql (-1 / +2 lines)
Lines 506-512 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
506
('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'),
506
('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'),
507
('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'),
507
('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'),
508
('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self registered','YesNo'),
508
('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self registered','YesNo'),
509
('PatronSelfRegistrationVerifyByEmail','0',NULL,'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate their account.','YesNo'),
509
('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'),
510
('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'),
510
('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'),
511
('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'),
511
('EnablePayPalOpacPayments',  '0', NULL ,  'Enables the ability to pay fees and fines from  the OPAC via PayPal',  'YesNo' ),
512
('EnablePayPalOpacPayments',  '0', NULL ,  'Enables the ability to pay fees and fines from  the OPAC via PayPal',  'YesNo' ),
512
('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' ),
513
('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 792-803 OPAC: Link Here
792
            - "library patrons to register for an account via the OPAC."
792
            - "library patrons to register for an account via the OPAC."
793
            - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code."
793
            - "<br><strong>NOTE:</strong> This needs PatronSelfRegistrationDefaultCategory to be set to a valid patron category code."
794
        -
794
        -
795
            - pref: PatronSelfRegistrationVerifyByEmail
795
            - pref: PatronSelfRegistrationVerifyByEmailToPatron
796
              choices:
796
              choices:
797
                  yes: Require
797
                  yes: Require
798
                  no: "Don't require"
798
                  no: "Don't require"
799
            - "that a self-registering patron verify themselves via email."
799
            - "that a self-registering patron verify themselves via email."
800
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
800
801
            - "<p>Enable librarian verification of OPAC self registrations by sending verification email to"
802
            - pref: PatronSelfRegistrationVerifyByEmailToLibrary
803
              default: 0
804
              choices:
805
                  0: None
806
                  BranchEmailAddress: email address of branch
807
                  KohaAdminEmailAddress: KohaAdminEmailAddress
808
            - "for a librarian to approve activation of Koha account.</p>"
809
            - "<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."
801
        -
810
        -
802
            - "Use the patron category code"
811
            - "Use the patron category code"
803
            - pref: PatronSelfRegistrationDefaultCategory
812
            - pref: PatronSelfRegistrationDefaultCategory
804
- 

Return to bug 25090