Bug 23770: (follow-up) Add tests for Koha::Objects->TO_JSON
[koha.git] / C4 / SIP / interactive_patron_check_password.pl
1 #!/usr/bin/perl
2 #
3
4 use warnings;
5 use strict;
6
7 use C4::SIP::ILS::Patron;
8 use C4::SIP::Sip qw(sipbool);
9 use Data::Dumper;
10
11 while (1) {
12         print "Enter patron barcode: ";
13         my $in = <>;
14         defined($in) or last;
15         chomp($in);
16         last unless $in;
17         my $patron = C4::SIP::ILS::Patron->new($in);
18         print Dumper($patron);
19         $patron or next;
20         print "Enter patron password: ";
21         $in = <>;
22         chomp($in);
23         print "Raw password is: " . $patron->{password}, "\n"; 
24         print " check_password: " . $patron->check_password($in), "\n"; 
25         print "        sipbool: " . sipbool($patron->check_password($in)), "\n"; 
26 }