Admin Console Customization and MySQL/MariaDB

Hi,
We’ve created customization (theme) for the admin console. The customization has a new section on the user management section to check the users disabled (enabled = 0) and generates a list (screenshot attached).

The new js controller is working fine for H2 engine, the same code and query is not working for MySQL/MariaDB engine. The query always returns all the users without managing the value of the column ENABLED.

The query and the customization depend on the engine of the database?

Kind regards,

Hi,
We can confirm the issue it only occurs when we are using MySQL/MariaDB engine, works fine using H2 engine.

After checking the transactions on MariaDB we’ve detected the query sent by Keycloak is not correct and always return all users without check the value of the ENABLED column.

select … and lower(userentity0_.ENABLED)=0 order by userentity0_.USERNAME asc limit 20;

The database engine doesn’t works with lower(userentity0_.ENABLED)=0 , we’ve tested without lower() and the result of the query is correct:

select … and userentity0_.ENABLED=0 order by userentity0_.USERNAME asc limit 20;

Checking the commit of https://github.com/keycloak/keycloak/pull/7388 confirms our issue:

Kind regards,