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
27 stars 68 forks source link

[BUGFIX] BE user creation on login. #53

Closed bbaumgartl closed 4 years ago

bbaumgartl commented 5 years ago

If a BE user does not yet exists in the DB it should be created after successful LDAP authentication. The user is first created with default values (Authentication:195) and afterwards updated with mapped LDAP values (Authentication:230). In TYPO3 v9 the field disable has the default value 1 which means after first creating the user it cannot be found by Typo3UserRepository:184 since this field is one of the enablecolumns (Restrictions).

This patch uses the QueryBuilder to remove all Restrictions (disable fields) from the select instead of using the $tableConnections select directly (which enables all Restrictions by default).

Since there was no restriction before Typo3UserRepository:159 this should be back to the original behavior.

bbaumgartl commented 5 years ago

Fixed indentation.

YKWeyer commented 5 years ago

:+1: It doesn't only affect TYPO3 v9 but the v8 as well.

I tested the fix with TYPO3 v8.7.26, and imported users are correctly enabled.

@xperseguers would you consider including the change in the extensions next patch (3.4.1)?


For the sake of clearness: in TYPO3 v8.7.26, with disable=0 in be_users_mapping :

xperseguers commented 4 years ago

Fixed in your name with 94190eb99b606a11611bc247b9147724736fe49c