xperseguers / t3ext-ig_ldap_sso_auth

TYPO3 Extension ig_ldap_sso_auth. This extension provides LDAP and SSO support for TYPO3.
https://extensions.typo3.org/extension/ig_ldap_sso_auth
GNU General Public License v3.0
30 stars 74 forks source link

Fix for "Incorrect integer value" on control TCA disabled property #212

Closed adrianrudnik closed 1 month ago

adrianrudnik commented 1 month ago

We have a scenario where disabled users are imported without previously existing.

This produces an Incorrect integer value: '' for column be_users.disable SQL error on MariaDB, as thje given value on the raw SQL is simply "" with the following truncated stacktrace:

#3 /var/www/html/public/typo3/sysext/core/Classes/Database/Connection.php(218): Doctrine\\DBAL\\Connection->insert('`be_users`', Array, Array)
#4 /var/www/html/public/typo3conf/ext/ig_ldap_sso_auth/Classes/Domain/Repository/Typo3UserRepository.php(179): TYPO3\\CMS\\Core\\Database\\Connection->insert('be_users', Array)
#5 /var/www/html/public/typo3conf/ext/ig_ldap_sso_auth/Classes/Utility/UserImportUtility.php(228): Causal\\IgLdapSsoAuth\\Domain\\Repository\\Typo3UserRepository::add('be_users', Array)
#6 /var/www/html/public/typo3conf/ext/ig_ldap_sso_auth/Classes/Task/ImportUsers.php(193): Causal\\IgLdapSsoAuth\\Utility\\UserImportUtility->import(Array, Array, 'nothing')
#7 /var/www/html/public/typo3/sysext/scheduler/Classes/Scheduler.php(192): Causal\\IgLdapSsoAuth\\Task\\ImportUsers->execute()

This fix forces the type to ensure the correct typing of the injected value according to the TYPO3 default TCA type.