Hi Parker, What about changing the collation of your DB/TABLE/COLUMN to a case insensitive (CI) one?
MYSQL seems to do that easily: ALTER TABLE user_table MODIFY COLUMN username VARCHAR(…) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI MSSQL would be something like: ALTER TABLE dbo.user_table ALTER COLUMN username VARCHAR(...) COLLATE Latin1_General_100_CI_AI_SC_UTF8 In both case, just select the collation that fits your needs, a CI one for *C*ase *I*nsensitive. If using another DB, you should have the same feature available... Pierre On Friday, July 10, 2020 at 1:24:21 AM UTC+2, Parker Grimes wrote: > > I recently set up a JDBC attributeRepository and my SQL query expects the > username passed from CAS to be lowercase. Does anyone know how to either > override the "WHERE {0}" or make sure the username being passed is > lowercase? > > The problem we have is people entering their username in mixed case like > "UserName" instead of "username" and "UserName" is being passed to the > "SELECT * FROM user_table WHERE {0}" > > From the logs: > DEBUG > [org.apereo.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao] > - <Generated query builder 'sql=[username = ?] args=[UserName]' from query > Map {username=[UserName]}.> > -- - Website: https://apereo.github.io/cas - Gitter Chatroom: https://gitter.im/apereo/cas - List Guidelines: https://goo.gl/1VRrw7 - Contributions: https://goo.gl/mh7qDG --- You received this message because you are subscribed to the Google Groups "CAS Community" group. To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+unsubscr...@apereo.org. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/1134582a-46a3-4908-b245-834e52a6d303o%40apereo.org.