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

(-)a/opac/sco/sco-main.pl (-1 / +7 lines)
Lines 129-137 unless ($patronid) { Link Here
129
}
129
}
130
130
131
my $patron;
131
my $patron;
132
my $anonymous_patron = C4::Context->preference('AnonymousPatron');
132
if ($patronid) {
133
if ($patronid) {
133
    Koha::Plugins->call( 'patron_barcode_transform', \$patronid );
134
    Koha::Plugins->call( 'patron_barcode_transform', \$patronid );
134
    $patron = Koha::Patrons->find( { cardnumber => $patronid } );
135
    $patron = Koha::Patrons->find( { cardnumber => $patronid } );
136
137
    # redirect to OPAC home if user is trying to log in as the anonymous patron
138
    if ( $patron && ( $patron->borrowernumber eq $anonymous_patron ) ) {
139
        print $query->redirect("/cgi-bin/koha/opac-main.pl");
140
        exit;
141
    }
135
}
142
}
136
143
137
undef $jwt unless $patron;
144
undef $jwt unless $patron;
138
- 

Return to bug 36679