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

Mapping fields with empty values #25

Closed presedo closed 6 years ago

presedo commented 6 years ago

For BE users, if we try to map the fields with empty values, this is not set when importing users.

For example, let's say we do not want the users to be able to edit in the LIVE workspace. I set the current mapping config : workspace_perms = 0

But in \Causal\IgLdapSsoAuth\Library\Configuration::parseMapping, the empty values are unset. In this case, the empty value is really what we want to set.

Empty values shouldn't be removed.

Removing if (empty($setup[$key])) test fixes this issue, but I may guess that this is here to fix other scenarios.

xperseguers commented 6 years ago

Instead of empty($setup[$key]) we should probably use a strict comparison $setup[$key] === ''.

presedo commented 6 years ago

I send you a pull request, ok ?

xperseguers commented 6 years ago

👍🏻

xperseguers commented 6 years ago

Next time be sure to include the ticket number in the commit message, just as you would for TYPO3 so that this ticket is closed automatically :)

Thanks for your patch.