OPAC: Barcode that starts with a letter cannot login to My Account

Bug #1581658 reported by Jennifer Pringle
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Medium
Unassigned

Bug Description

Evergreen 2.8 and Evergreen 2.10.2

If you have a patron barcode that starts with a letter it cannot be used to login to My Account.

This is an issue for patrons with barcodes that are prefixed with letters. ie. MPL1234 (for Maple Public Library).

I think this is related some or all of the following:
https://bugs.launchpad.net/evergreen/+bug/1255561
https://bugs.launchpad.net/evergreen/+bug/997098
https://bugs.launchpad.net/evergreen/+bug/1528647

Galen Charlton (gmc)
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Galen Charlton (gmc) wrote :

As a work-around, the opac.barcode_regex library setting could be used to identify cases where patron barcodes start with something other than a digit. E.g., if any string that starts with either a digit or with MPL is (likely) a barcode, you could use something like "^(\d|MPL)" as the regex.

This isn't perfect, however -- if there are other patrons not belonging to MPL who nonetheless have usernames starting with "MPL", they would not be able to log in using their username.

Revision history for this message
Beth Longwell (blongwel) wrote :

I'm seeing this in 3.1.7.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

There is a hard coded value of '^\d' used in the absence of the opac.barcode_regex setting. You should use the setting. However, the hard coded regular expression could be changed to allow anything as a barcode.

I'm not sure what restricting it to requiring something that begins with a number buys anyone.

Does anyone know why the code is as it is?

Revision history for this message
Jason Stephenson (jstephenson) wrote :

OK. So, I can answer my own question after spending < 5 minutes looking at it. The code in EGCatLoader.pm needs some way to differentiate a barcode from a user name because either can be used to login.

I think the solution to this is to set the opac.barcode_regex setting as appropriate for you your local conditions.

Revision history for this message
Tina Ji (tji) wrote :

We have various formats of barcode and usrname. Probably the solution is using separate boxes for usrname and barcode on the interface.

Revision history for this message
Michele Morgan (mmorgan) wrote :

Just noting this is still an issue in the 3.11 Bootstrap OPAC.

Changed in evergreen:
importance: Undecided → Medium
tags: added: patron
tags: added: opac-account
Revision history for this message
Terran McCanna (tmccanna) wrote :

I'm not seeing this problem either in our 3.12 production site or in current main with Concerto data (both using Bootstrap OPAC), but I'm not sure if something has changed or if it's a configuration difference. (Note that opac.barcode_regex is null on both of these servers.)

Revision history for this message
Devon Bates (devonbates) wrote :

Using EG 3.14+

With this error, it depends on a few factors; I eventually made a table with details to help keep track (screenshot attached). I created 20 different accounts to test (to avoid an account's barcode overlapping with a different account's username, or vice versa).

There are four possible combinations I've considered; all numbers (123456), all letters (ABCDEF), one number then letters (1AAAAA), and one letter then numbers (A11111).

As long as the barcode and username match, there is no issue.

However, if the barcode and username do not match, there may be an issue with being able to log in with the barcode, the username, or both.

If the barcode is a number and then letters (1AAAAA), it does not seem to matter the order or combination of letters or numbers for the username; in this scenario, both barcode and username can be used to log into My Account.

Here's where there are issues:

If the barcode is all numbers (123456), there is an issue with the username if it is all numbers but different numbers (654321). Other username combinations seem OK.

If the barcode is all letters (ABCDEF) one cannot log into My Account with the barcode if the username differs. In this situation, a username will function only if it's all letters, even different ones (FEDCBA) or begins with a letter (A11111), but not if the username is all numbers (123456) or begins with a number (1AAAAA).

If the barcode is a letter and then numbers (A11111) and the username differs, one cannot log into My Account with the barcode. In this case, the username will function only if it's all letters (ABCDEF) or begins with a letter, even a different one (B11111), but not if the username is all numbers (123456) or begins with a number (1AAAAA).

This means a username will work, regardless of barcode, if it is all letters (ABCDEF), or, if it starts with a letter and continues with numbers (A11111).

This also means a barcode will work, regardless of username, if it is all numbers (123456).

However, if the username is all numbers (123456) it won't work if the barcode is different numbers or begins with or contains all letters (barcode of 654321, ABCDEF, or A11111) and if the username begins with a number (1AAAAA) it won't work if the barcode begins with or contains all letters (barcode of ABCDEF or A11111).

Revision history for this message
Devon Bates (devonbates) wrote :

Error with attached file for previous comment; here it is, re-attached.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.