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

(-)a/installer/data/mysql/atomicupdate/bug_25090_-_update_PatronSelfRegistrationVerifyByEmail_syspref.pl (+20 lines)
Line 0 Link Here
1
use Modern::Perl;
2
use Koha::Installer::Output qw(say_warning say_success say_info);
3
4
return {
5
    bug_number  => "25090",
6
    description => "Moderate OPAC self registrations before a patron account is created",
7
    up          => sub {
8
        my ($args) = @_;
9
        my ( $dbh, $out ) = @$args{qw(dbh out)};
10
11
        $dbh->do(
12
            q{UPDATE systempreferences SET value = "off", options = "off|patron|library", type = "Choice" WHERE variable = "PatronSelfRegistrationVerifyByEmail" and value = "0"}
13
        );
14
        $dbh->do(
15
            q{UPDATE systempreferences SET value = "patron", options = "off|patron|library", type = "Choice" WHERE variable = "PatronSelfRegistrationVerifyByEmail" and value = "1"}
16
        );
17
18
        say_success( $out, "Updated system preference 'PatronSelfRegistrationVerifyByEmail' to include choices" );
19
    },
20
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 635-641 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
635
('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'),
635
('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'),
636
('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'),
636
('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'),
637
('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self-registered','YesNo'),
637
('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self-registered','YesNo'),
638
('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'),
638
('PatronSelfRegistrationVerifyByEmail','off','off|patron|library','If enabled, any patron attempting to register themselves via the OPAC will require self-verification or library verification via email to activate their account.','Choice'),
639
('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'),
639
('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'),
640
('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo'),
640
('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo'),
641
('PlaceHoldsOnOrdersFromSuggestions','0',NULL,'If ON, enables generation of holds when orders are placed from suggestions','YesNo'),
641
('PlaceHoldsOnOrdersFromSuggestions','0',NULL,'If ON, enables generation of holds when orders are placed from suggestions','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-4 / +5 lines)
Lines 833-842 OPAC: Link Here
833
        -
833
        -
834
            - pref: PatronSelfRegistrationVerifyByEmail
834
            - pref: PatronSelfRegistrationVerifyByEmail
835
              choices:
835
              choices:
836
                  1: Require
836
                  patron: "must verify themselves via email"
837
                  0: "Don't require"
837
                  library: "must be verified via email sent to EmailPatronRegistrations"
838
            - "that a self-registering patron verify themselves via email."
838
                  off: "is not required to verify themselves"
839
            - "to activate their account."
839
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
840
            - "<br><strong>NOTE:</strong> This system preference requires the <code>misc/cronjobs/cleanup_database.pl</code> cronjob. Ask your system administrator to schedule it."
841
            - "<br><strong>NOTE:</strong> Ensure the <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=EmailPatronRegistrations'>EmailPatronRegistrations</a> system preference is set if you choose that verification option."
840
        -
842
        -
841
            - "Use"
843
            - "Use"
842
            - pref: PatronSelfRegistrationDefaultCategory
844
            - pref: PatronSelfRegistrationDefaultCategory
843
- 

Return to bug 25090