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 70 forks source link

Log errors while syncing users: Undefined array key "uid" in ../Task/ImportUsers.php line 175 #188

Open mfvetter opened 11 months ago

mfvetter commented 11 months ago

Hello!

In PHP 8.1 and TYPO3 11.5, I have a scheduled task to import/sync users from Active Directory. I'm getting a few log errors during the sync process:

Core: Error handler (BE): PHP Warning: Undefined array key "uid" in .../typo3conf
/ext/ig_ldap_sso_auth/Classes/Task/ImportUsers.php line 175 

Maybe that line could be adjusted from:

if (in_array($user['uid'], $disabledOrDeletedUserUids, true)) {

to:

if (isset($user['uid']) && in_array($user['uid'], $disabledOrDeletedUserUids, true)) {

Not sure if that should be adjusted somewhere else before that line...

Thanks again for this awesome extension!

Prospero256 commented 7 months ago

Hello,

we encountered different situation, but with the same error message:

PHP Warning: Undefined array key "uid" in /var/www/html/web/typo3conf/ext/ig_ldap_sso_auth/Classes/Hooks/IconFactory.php line 46

This happens, when we try to create a new folder in the page tree and then a new record with the "+" button in the list-module.

I was pointed towards this patch:

https://github.com/xperseguers/t3ext-ig_ldap_sso_auth/commit/eca798574fe6092184a6498de2eed177cbc6937b

which, if I am informed correctly, to this date has not been part of an official release yet.