Commit 48d6d281 by Tuukka Kivilahti

debuggausta, vois ajaa

1 parent 128799f7
......@@ -370,6 +370,8 @@ public class BarcodeBean implements BarcodeBeanLocal {
if (barcode == null || barcode.isEmpty())
return null;
logger.debug("Getting user from barcode {}", barcode);
// trim zeros off from barcode
String stripped = barcode;
while (stripped.length() > 0 && stripped.charAt(0) == '0') {
......@@ -387,14 +389,14 @@ public class BarcodeBean implements BarcodeBeanLocal {
EventUser user = userBean.findByEventUserId(id);
return user;
} else if(barcode.contains(EVENTUSER_BARCODEPREFIX)) {
} /* else if(barcode.contains(EVENTUSER_BARCODEPREFIX)) {
String trimmedBarcode = barcode.substring(barcode.indexOf(EVENTUSER_BARCODEPREFIX));
int id = Integer.parseInt(trimmedBarcode.substring(3, trimmedBarcode.length() - 1));
logger.debug("finding user with barcode {} and id {}", trimmedBarcode, id);
EventUser user = userBean.findByEventUserId(id);
return user;
}
}*/
// try if it is our Eticket -code
EventUser user = getUserFromTextCode(barcode);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!