vufind-tech

Thanks for sharing this -- I actually don't think there's a better way to do it. I've added it to the trunk as r2045. I suppose if we wanted to get fancy we could add a setting to Voyager.ini to configure whether or not login is case-sensitive, but I really can't think of a good reason to bother. The case insensitive approach should save a lot of confusion without diminishing security.
- Demian
From: Matthew Hooper [mailto:Matthew.Hooper@...]
Sent: Tuesday, January 05, 2010 1:03 AM
To: vufind-tech@...
Subject: [VuFind-Tech] Voyager ILS login and quick fix in RC2
Importance: Low
Hi all,
We've just started configuring RC2 as a fresh install, and it looks like the Voyager.php has a login function using barcode and surname. It seems the function is case sensitive - so either you can let your patrons login with the exact barcode and surname or make a few quick changes to the Voyager.php as shown below:
public function patronLogin($barcode, $lname)
{
$sql = "SELECT PATRON.PATRON_ID, PATRON.FIRST_NAME " .
"FROM $this->dbName.PATRON, $this->dbName.PATRON_BARCODE " .
"WHERE PATRON.PATRON_ID = PATRON_BARCODE.PATRON_ID AND " .
"lower(PATRON.LAST_NAME) = :lname AND lower(PATRON_BARCODE.PATRON_BARCODE) = :barcode";
try {
$sqlStmt = $this->db->prepare($sql);
$sqlStmt->bindParam(':lname', strtolower($lname), PDO::PARAM_STR);
$sqlStmt->bindParam(':barcode', strtolower($barcode), PDO::PARAM_STR);
I've just changed a few bits to do a lower case comparison against lowercase converted strings so it doesn't matter what case the patrons enter the barcode/surname combo in.
There's probably a better way of fixing it - but this was a quick fix that seems to work.
Cheers,
Matt.
--
Matthew Hooper
Systems Officer,
Flinders University Library
G.P.O. Box 2100
ADELAIDE, South Australia 5001
T: +618 8201 2068
F: +618 8201 2508
E: Matthew.Hooper@...
<<...>>