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

(-)a/C4/Members.pm (-1 / +1 lines)
Lines 2384-2390 sub GetBorrowersWithEmail { Link Here
2384
sub AddMember_Opac {
2384
sub AddMember_Opac {
2385
    my ( %borrower ) = @_;
2385
    my ( %borrower ) = @_;
2386
2386
2387
    $borrower{'categorycode'} = C4::Context->preference('PatronSelfRegistrationUseTemporaryStatus');
2387
    $borrower{'categorycode'} = C4::Context->preference('PatronSelfRegistrationDefaultCategory');
2388
2388
2389
    my $sr = new String::Random;
2389
    my $sr = new String::Random;
2390
    $sr->{'A'} = [ 'A'..'Z', 'a'..'z' ];
2390
    $sr->{'A'} = [ 'A'..'Z', 'a'..'z' ];
(-)a/installer/data/mysql/sysprefs.sql (-2 / +2 lines)
Lines 374-380 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
374
INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
374
INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
375
('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'),
375
('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'),
376
('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'),
376
('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'),
377
('PatronSelfRegistrationUseTemporaryStatus', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'),
377
('PatronSelfRegistrationDefaultCategory', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'),
378
('PatronSelfRegistrationExpireTemporaryAccountsDelay', '0', NULL, 'If PatronSelfRegistrationUseTemporaryStatus 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'),
378
('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'),
379
('PatronSelfRegistrationBorrowerMandatoryField',  'surname|firstname', NULL ,  'Choose the mandatory fields for a patron''s account, when registering via the OPAC.',  'free'),
379
('PatronSelfRegistrationBorrowerMandatoryField',  'surname|firstname', NULL ,  'Choose the mandatory fields for a patron''s account, when registering via the OPAC.',  'free'),
380
('PatronSelfRegistrationBorrowerUnwantedField',  '', NULL ,  'Name the fields you don''t want to display when registering a new patron via the OPAC.',  'free');
380
('PatronSelfRegistrationBorrowerUnwantedField',  '', NULL ,  'Name the fields you don''t want to display when registering a new patron via the OPAC.',  'free');
(-)a/installer/data/mysql/updatedatabase.pl (-2 / +2 lines)
Lines 5779-5786 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
5779
        INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
5779
        INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
5780
        ('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'),
5780
        ('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'),
5781
        ('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'),
5781
        ('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'),
5782
        ('PatronSelfRegistrationUseTemporaryStatus', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'),
5782
        ('PatronSelfRegistrationDefaultCategory', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'),
5783
        ('PatronSelfRegistrationExpireTemporaryAccountsDelay', '0', NULL, 'If PatronSelfRegistrationUseTemporaryStatus 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'),
5783
        ('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'),
5784
        ('PatronSelfRegistrationBorrowerMandatoryField',  'surname|firstname', NULL ,  'Choose the mandatory fields for a patron''s account, when registering via the OPAC.',  'free'),
5784
        ('PatronSelfRegistrationBorrowerMandatoryField',  'surname|firstname', NULL ,  'Choose the mandatory fields for a patron''s account, when registering via the OPAC.',  'free'),
5785
        ('PatronSelfRegistrationBorrowerUnwantedField',  '', NULL ,  'Name the fields you don''t want to display when registering a new patron via the OPAC.',  'free');
5785
        ('PatronSelfRegistrationBorrowerUnwantedField',  '', NULL ,  'Name the fields you don''t want to display when registering a new patron via the OPAC.',  'free');
5786
    ");
5786
    ");
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (-1 / +1 lines)
Lines 515-521 OPAC: Link Here
515
            - "that a self-registering patron verify his or herself via email."
515
            - "that a self-registering patron verify his or herself via email."
516
        -
516
        -
517
            - "Use the patron category code"
517
            - "Use the patron category code"
518
            - pref: PatronSelfRegistrationUseTemporaryStatus
518
            - pref: PatronSelfRegistrationDefaultCategory
519
              class: short
519
              class: short
520
            - "as the default patron category for patrons registered via the OPAC."
520
            - "as the default patron category for patrons registered via the OPAC."
521
        -
521
        -
(-)a/misc/cronjobs/delete_expired_opac_registrations.pl (-2 / +1 lines)
Lines 34-40 use C4::Members qw/ DelMember /; Link Here
34
my $delay =
34
my $delay =
35
  C4::Context->preference('PatronSelfRegistrationExpireTemporaryAccountsDelay');
35
  C4::Context->preference('PatronSelfRegistrationExpireTemporaryAccountsDelay');
36
my $category_code =
36
my $category_code =
37
  C4::Context->preference('PatronSelfRegistrationUseTemporaryStatus');
37
  C4::Context->preference('PatronSelfRegistrationDefaultCategory');
38
38
39
my $query = "
39
my $query = "
40
    SELECT borrowernumber
40
    SELECT borrowernumber
41
- 

Return to bug 7067