Code Duplication    Length = 4-4 lines in 2 locations

src/engine/ldap.php 2 locations

@@ 150-153 (lines=4) @@
147
    {
148
        debug_write_log(DEBUG_ERROR, '[ldap_finduser] ldap_set_option(LDAP_OPT_REFERRALS) error: ' . ldap_err2str(ldap_errno($link)));
149
    }
150
    elseif (LDAP_USE_TLS && !@ldap_start_tls($link))
151
    {
152
        debug_write_log(DEBUG_ERROR, '[ldap_finduser] ldap_start_tls() error: ' . ldap_err2str(ldap_errno($link)));
153
    }
154
    elseif (!@ldap_bind($link, LDAP_USERNAME, LDAP_PASSWORD))
155
    {
156
        debug_write_log(DEBUG_WARNING, '[ldap_finduser] ldap_bind(anonymous) error: ' . ldap_err2str(ldap_errno($link)));
@@ 241-244 (lines=4) @@
238
    {
239
        debug_write_log(DEBUG_ERROR, '[ldap_findallusers] ldap_set_option(LDAP_OPT_REFERRALS) error: ' . ldap_err2str(ldap_errno($link)));
240
    }
241
    elseif (LDAP_USE_TLS && !@ldap_start_tls($link))
242
    {
243
        debug_write_log(DEBUG_ERROR, '[ldap_finduser] ldap_start_tls() error: ' . ldap_err2str(ldap_errno($link)));
244
    }
245
    elseif (!@ldap_bind($link, LDAP_USERNAME, LDAP_PASSWORD))
246
    {
247
        debug_write_log(DEBUG_WARNING, '[ldap_findallusers] ldap_bind(anonymous) error: ' . ldap_err2str(ldap_errno($link)));