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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc (-1 / +1 lines)
Lines 40-46 Link Here
40
                <a href="/cgi-bin/koha/opac-tags.pl?mine=1">your tags</a></li>
40
                <a href="/cgi-bin/koha/opac-tags.pl?mine=1">your tags</a></li>
41
            [% END %]
41
            [% END %]
42
42
43
            [% IF ( OpacPasswordChange ) %]
43
            [% IF logged_in_user.category.effective_change_password %]
44
                [% IF ( passwdview ) %]
44
                [% IF ( passwdview ) %]
45
                    <li class="active">
45
                    <li class="active">
46
                [% ELSE %]
46
                [% ELSE %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt (-2 / +2 lines)
Lines 51-57 Link Here
51
                        </div>
51
                        </div>
52
                    [% END # /IF Error_messages %]
52
                    [% END # /IF Error_messages %]
53
53
54
                    [% IF ( OpacPasswordChange ) %]
54
                    [% IF logged_in_user.category.effective_change_password %]
55
                        [% IF ( Ask_data ) %]
55
                        [% IF ( Ask_data ) %]
56
56
57
57
Lines 71-77 Link Here
71
                        [% END # /IF Ask_data %]
71
                        [% END # /IF Ask_data %]
72
                    [% ELSE %]
72
                    [% ELSE %]
73
                        <div class="alert">You can't change your password.</div>
73
                        <div class="alert">You can't change your password.</div>
74
                    [% END # /IF OpacPasswordChange %]
74
                    [% END # /IF logged_in_user.category.effective_change_password %]
75
75
76
                    [% IF ( password_updated ) %]
76
                    [% IF ( password_updated ) %]
77
                        <div class="alert alert-success">
77
                        <div class="alert alert-success">
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt (-1 / +7 lines)
Lines 53-59 Link Here
53
                                </p>
53
                                </p>
54
                            [% END %]
54
                            [% END %]
55
55
56
                            <p id="patron-instructions">For your convenience, the login box on this page has been pre-filled with this data. Please log in[% IF OpacPasswordChange %] and change your password[% END %].</p>
56
                            <p id="patron-instructions">
57
                            [% IF borrower.category.effective_change_password %]
58
                                <span>For your convenience, the login box on this page has been pre-filled with this data. Please log in and change your password.</span>
59
                            [% ELSE %]
60
                                <span>For your convenience, the login box on this page has been pre-filled with this data. Please log in.</span>
61
                            [% END %]
62
                            </p>
57
                        [% END %]
63
                        [% END %]
58
64
59
                        <div id="PatronSelfRegistrationAdditionalInstructions">[% PatronSelfRegistrationAdditionalInstructions | $raw %]</div>
65
                        <div id="PatronSelfRegistrationAdditionalInstructions">[% PatronSelfRegistrationAdditionalInstructions | $raw %]</div>
(-)a/opac/opac-memberentry.pl (-3 lines)
Lines 205-213 if ( $action eq 'create' ) { Link Here
205
                }
205
                }
206
            );
206
            );
207
207
208
            $template->param( OpacPasswordChange =>
209
                  C4::Context->preference('OpacPasswordChange') );
210
211
            $borrower{categorycode}     ||= C4::Context->preference('PatronSelfRegistrationDefaultCategory');
208
            $borrower{categorycode}     ||= C4::Context->preference('PatronSelfRegistrationDefaultCategory');
212
            $borrower{password}         ||= Koha::AuthUtils::generate_password;
209
            $borrower{password}         ||= Koha::AuthUtils::generate_password;
213
            my $consent_dt = delete $borrower{gdpr_proc_consent};
210
            my $consent_dt = delete $borrower{gdpr_proc_consent};
(-)a/opac/opac-passwd.pl (-1 / +1 lines)
Lines 44-50 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
44
);
44
);
45
45
46
my $patron = Koha::Patrons->find( $borrowernumber );
46
my $patron = Koha::Patrons->find( $borrowernumber );
47
if ( C4::Context->preference("OpacPasswordChange") ) {
47
if ( $patron->category->effective_change_password ) {
48
    if (   $query->param('Oldkey')
48
    if (   $query->param('Oldkey')
49
        && $query->param('Newkey')
49
        && $query->param('Newkey')
50
        && $query->param('Confirm') )
50
        && $query->param('Confirm') )
(-)a/opac/opac-registration-verify.pl (-5 / +1 lines)
Lines 58-66 if ( Link Here
58
        }
58
        }
59
    );
59
    );
60
60
61
    $template->param(
62
        OpacPasswordChange => C4::Context->preference('OpacPasswordChange') );
63
64
    my $patron_attrs = $m->unblessed;
61
    my $patron_attrs = $m->unblessed;
65
    $patron_attrs->{password} ||= Koha::AuthUtils::generate_password;
62
    $patron_attrs->{password} ||= Koha::AuthUtils::generate_password;
66
    my $consent_dt = delete $patron_attrs->{gdpr_proc_consent};
63
    my $consent_dt = delete $patron_attrs->{gdpr_proc_consent};
Lines 76-82 if ( Link Here
76
        C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $patron->borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if C4::Context->preference('EnhancedMessagingPreferences');
73
        C4::Form::MessagingPreferences::handle_form_action($cgi, { borrowernumber => $patron->borrowernumber }, $template, 1, C4::Context->preference('PatronSelfRegistrationDefaultCategory') ) if C4::Context->preference('EnhancedMessagingPreferences');
77
74
78
        $template->param( password_cleartext => $patron->plain_text_password );
75
        $template->param( password_cleartext => $patron->plain_text_password );
79
        $template->param( borrower => $patron->unblessed );
76
        $template->param( borrower => $patron );
80
        $template->param(
77
        $template->param(
81
            PatronSelfRegistrationAdditionalInstructions =>
78
            PatronSelfRegistrationAdditionalInstructions =>
82
              C4::Context->preference(
79
              C4::Context->preference(
83
- 

Return to bug 10796