From: Dan Scott Date: Wed, 17 Aug 2011 17:01:08 +0000 (-0400) Subject: Assume username, not barcode, in TPAC login X-Git-Tag: sprint4-merge-nov22~5128^2~41^2~13 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9a3c9bd5b4fdc0e40078c8bd726623e762c8cc13;p=working%2FEvergreen.git Assume username, not barcode, in TPAC login In the absence of a barcode regex OU setting (opac.barcode_regex), the TPAC was assuming that the entered value was a barcode. However, the default JSPAC assumption was that the entered value was a username. This commit makes the TPAC continue to function with the same assumptions as the default JSPAC in the absence of a barcode regex OU setting. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 6412907fca..a9d0565757 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -288,15 +288,15 @@ sub load_login { 'open-ils.auth.authenticate.init', $username); my $args = { - barcode => $username, + username => $username, password => md5_hex($seed . md5_hex($password)), type => ($persist) ? 'persist' : 'opac' }; my $bc_regex = $ctx->{get_org_setting}->($org_unit, 'opac.barcode_regex'); - $args->{username} = delete $args->{barcode} - if $bc_regex and !($username =~ /$bc_regex/); + $args->{barcode} = delete $args->{username} + if $bc_regex and ($username =~ /$bc_regex/); my $response = $U->simplereq( 'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);