Check for valid LDAP-resource before querying.
Check for valid LDAP-resource before querying.

Check if we have get valid link identifier from
self::getConnectionResource() before using ldap_search() and
ldap_get_entries(), otherwise return an empty array.

Signed-off-by: Benjamin Diele <fe09bc2ef2737a3258f978e26226dcbac1b3f948@diele.be>

cernbox/core,Ardinis/server,xx621998xx/server,lrytz/core,nextcloud/server,andreas-p/nextcloud-server,IljaN/core,pixelipo/server,pmattern/server,andreas-p/nextcloud-server,michaelletzgus/nextcloud-server,IljaN/core,IljaN/core,endsguy/server,owncloud/core,bluelml/core,owncloud/core,cernbox/core,jbicha/server,sharidas/core,whitekiba/server,lrytz/core,pmattern/server,whitekiba/server,lrytz/core,lrytz/core,pollopolea/core,sharidas/core,nextcloud/server,endsguy/server,xx621998xx/server,bluelml/core,xx621998xx/server,Ardinis/server,whitekiba/server,owncloud/core,pmattern/server,owncloud/core,pmattern/server,pixelipo/server,Ardinis/server,pollopolea/core,jbicha/server,lrytz/core,endsguy/server,nextcloud/server,bluelml/core,Ardinis/server,phil-davis/core,nextcloud/server,Ardinis/server,xx621998xx/server,pmattern/server,pixelipo/server,sharidas/core,whitekiba/server,andreas-p/nextcloud-server,jbicha/server,owncloud/core,pixelipo/server,jbicha/server,IljaN/core,michaelletzgus/nextcloud-server,cernbox/core,andreas-p/nextcloud-server,michaelletzgus/nextcloud-server,endsguy/server,sharidas/core,andreas-p/nextcloud-server,sharidas/core,bluelml/core,pollopolea/core,cernbox/core,IljaN/core,cernbox/core,jbicha/server,endsguy/server,pixelipo/server,whitekiba/server,bluelml/core,michaelletzgus/nextcloud-server,pollopolea/core,pollopolea/core,xx621998xx/server