From: Dan Pearl <dpearl@cwmars.org>
Date: Tue, 11 Dec 2012 15:13:41 +0000 (-0500)
Subject: LP: #1086064  Ignore spaces in opac username/barcode entry field
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=84d91473fd54686f472205c5d5826d20f0849c7f;p=evergreen%2Fmasslnc.git

LP: #1086064  Ignore spaces in opac username/barcode entry field

Too often, patrons copy the spacing on the barcode on their keytag,
or enter a spurious space before entering their name/barcode. This
change will remove spaces in their name/barcode.

(For now, keep the login screen's directions to omit spaces when
entering the username/barcode.)

Signed-off-by: Dan Pearl <dpearl@cwmars.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
---

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
index 5d536dd2d2..ad222e5a93 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm
@@ -352,6 +352,7 @@ sub load_login {
     $ctx->{page} = 'login';
 
     my $username = $cgi->param('username');
+    $username =~ s/\s//g;  # Remove blanks
     my $password = $cgi->param('password');
     my $org_unit = $ctx->{physical_loc} || $ctx->{aou_tree}->()->id;
     my $persist = $cgi->param('persist');