Fixed following warnings thrown by plugin in production.
1. PHP Warning: ldap_search(): Search: Operations error.
2.  PHP Warning: ldap_get_entries() expects parameter 2 to be resource