KircheNeuenburg / ldapcontacts

View other LDAP users as contacts in Nextcloud and see the personal data they shared
GNU Affero General Public License v3.0
18 stars 12 forks source link

Undefined index: entryuuid #22

Closed alexhor closed 6 years ago

alexhor commented 6 years ago

post by @j0hng0gu moved from #15

Hi,

Since upgraded to NC13.0 LDAP Contacts doesn't work anymore. Does not display any contact. And the errors from nextcloud.log is: "Undefined index: entryuuid at /var/www/html/apps/ldapcontacts/lib/Controller/ContactController.php#470" "Undefined index: entryuuid at /var/www/html/apps/ldapcontacts/lib/Controller/ContactController.php#471"

Environment: CentOS 7.4 Apache 2.4.6 mysql 5.5.56 php 7.1.14

Integration with MS AD work fine, but not LDAP Contacts. In NC v.12.04 was working.

Any ideas what could be the problem? Many thanks!

alexhor commented 6 years ago

in the newest version I switched to the LDAP attribute "entryUUID" as a unique identifyer. It should be present in all current LDAP servers. Could you please check if this attribute exists in your server configuration.

alexhor commented 6 years ago

I currently don't have a MS AD installation where I can do further trubbleshooting, so it might take me some time to fix this, sorry.

j0hng0gu commented 6 years ago

Hi. Thank you for your quick answer. I've just checked and unfortunatelly there is no such attribute in Microsoft AD 2012 R2. Is there any chance to release a patch or something for the app?

alexhor commented 6 years ago

I'll just add an option where you can replace the entryuuid with and LDAP attribute. If you set that to "dn", then the app should work as before.

alexhor commented 6 years ago

I'll let you know once the patch is out.

j0hng0gu commented 6 years ago

That's GREAT! Very much appreciated! Thank you!

alexhor commented 6 years ago

update is now available in the app shop

j0hng0gu commented 6 years ago

Hi! I've just updated and WORKS great! And is faster. Very nice job.

However, I still get some errors in nextcloud.log:

ldap_list(): Search: Bad search filter at /var/www/html/apps/ldapcontacts/lib/Controller/ContactController.php#357

ldap_get_entries() expects parameter 2 to be resource, boolean given at /var/www/html/apps/ldapcontacts/lib/Controller/ContactController.php#358

And I get these lines may times, I think for every lpad contact. Do you know what may be the cause?

j0hng0gu commented 6 years ago

I think these errors are generated when "LDAP Group attribute used for group membership" field is not filled in. My setup is as shown in screen-capture below:

screen shot 2018-02-23 at 13 02 26

I don't know what attribute should be in that field.. It's kind of confusing..