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

(-)a/koha-tmpl/opac-tmpl/prog/en/includes/opac-bottom.inc (-1 / +4 lines)
Lines 72-78 navigator.id.watch({ Link Here
72
            function (data) {
72
            function (data) {
73
                window.location = '/cgi-bin/koha/opac-user.pl';
73
                window.location = '/cgi-bin/koha/opac-user.pl';
74
            }
74
            }
75
        );
75
        )
76
        .fail(function() { var errstr = _("Could not login, perhaps your Persona email does not match your Koha one");
77
            alert(errstr);
78
        });
76
    },
79
    },
77
    onlogout: function () {
80
    onlogout: function () {
78
        window.location = '/cgi-bin/koha/opac-main.pl?logout.x=1';
81
        window.location = '/cgi-bin/koha/opac-main.pl?logout.x=1';
(-)a/opac/svc/login (-3 / +8 lines)
Lines 44-51 if ( $response->is_success ) { Link Here
44
    my $decoded_json = decode_json($content);
44
    my $decoded_json = decode_json($content);
45
    my ( $userid, $cookie, $sessionID ) =
45
    my ( $userid, $cookie, $sessionID ) =
46
      checkauth( $query, 1,  { borrow => 1 }, 'opac', $decoded_json->{'email'} );
46
      checkauth( $query, 1,  { borrow => 1 }, 'opac', $decoded_json->{'email'} );
47
    print $query->header( -cookie => $cookie );
47
    if ($userid) { # a valid user has logged in
48
    print $decoded_json;
48
        print $query->header( -cookie => $cookie );
49
        print $decoded_json;
50
    } 
51
    else {
52
# logged in with an email that isn't associated with a borrower
53
        die "Email not associated with a borrower";
54
    }
49
}
55
}
50
else {
56
else {
51
    warn $response->status_line, "\n";
57
    warn $response->status_line, "\n";
52
- 

Return to bug 9587