public function initializeLdap() {
        //initialize from parent
        $this->initialize();
        
        //validate ldap settings
        $ldapSettings = $this->_passwordAuthenticationPlatformSettings;

        if(
            !(array_key_exists('ldap_account_suffix', $ldapSettings))
            ||!(array_key_exists('ad_password', $ldapSettings))
            || !(array_key_exists('ad_username', $ldapSettings))
            || !(array_key_exists('base_dn', $ldapSettings))
            || !(array_key_exists('cn_identifier', $ldapSettings))
            || !(array_key_exists('domain_controllers', $ldapSettings))
            || !(array_key_exists('group_attribute', $ldapSettings))
            || !(array_key_exists('group_cn_identifier', $ldapSettings))
            || !(array_key_exists('ldap_server_type', $ldapSettings))
            || !(array_key_exists('network_timeout', $ldapSettings))
            || !(array_key_exists('port', $ldapSettings))
            || !(array_key_exists('recursive_groups', $ldapSettings))
            || !(array_key_exists('time_limit', $ldapSettings))
            || !(array_key_exists('use_ssl', $ldapSettings))
            || !(array_key_exists('cache_support', $ldapSettings))
            || !(array_key_exists('cache_folder', $ldapSettings))
            || !(array_key_exists('expired_password_valid', $ldapSettings))
        ) {
           throw new UserCredentialException("The LDAP feature of the usercredential login service is not initialized with all parameters", 2000);
        }
        
        //inject settings to the ldap handler
        $this->_passwordAuthenticationPlatformSettings = $ldapSettings;       
        $this->initializeLdapAuthenticationHandler();
    }
public function initializeLdap() {
        //initialize from parent
        $this->initialize();
        
        //validate ldap settings
        $ldapSettings = $this->_passwordAuthenticationPlatformSettings;

        if(
            !(array_key_exists('ldap_account_suffix', $ldapSettings))
            ||!(array_key_exists('ad_password', $ldapSettings))
            || !(array_key_exists('ad_username', $ldapSettings))
            || !(array_key_exists('base_dn', $ldapSettings))
            || !(array_key_exists('cn_identifier', $ldapSettings))
            || !(array_key_exists('domain_controllers', $ldapSettings))
            || !(array_key_exists('group_attribute', $ldapSettings))
            || !(array_key_exists('group_cn_identifier', $ldapSettings))
            || !(array_key_exists('ldap_server_type', $ldapSettings))
            || !(array_key_exists('network_timeout', $ldapSettings))
            || !(array_key_exists('port', $ldapSettings))
            || !(array_key_exists('recursive_groups', $ldapSettings))
            || !(array_key_exists('time_limit', $ldapSettings))
            || !(array_key_exists('use_ssl', $ldapSettings))
            || !(array_key_exists('cache_support', $ldapSettings))
            || !(array_key_exists('cache_folder', $ldapSettings))
            || !(array_key_exists('expired_password_valid', $ldapSettings))
        ) {
           throw new UserCredentialException("The LDAP feature of the usercredential login service is not initialized with all parameters", 2000);
        }
        
        //inject settings to the ldap handler
        $this->_passwordAuthenticationPlatformSettings = $ldapSettings;       
        $this->initializeLdapAuthenticationHandler();
    }
public function initializeLdap ( ) { //initialize from parent $ this -> initialize ( ) ; //validate ldap settings $ ldapSettings = $ this -> _passwordAuthenticationPlatformSettings ; if ( ! ( array_key_exists ( 'ldap_account_suffix' , $ ldapSettings ) ) || ! ( array_key_exists ( 'ad_password' , $ ldapSettings ) ) || ! ( array_key_exists ( 'ad_username' , $ ldapSettings ) ) || ! ( array_key_exists ( 'base_dn' , $ ldapSettings ) ) || ! ( array_key_exists ( 'cn_identifier' , $ ldapSettings ) ) || ! ( array_key_exists ( 'domain_controllers' , $ ldapSettings ) ) || ! ( array_key_exists ( 'group_attribute' , $ ldapSettings ) ) || ! ( array_key_exists ( 'group_cn_identifier' , $ ldapSettings ) ) || ! ( array_key_exists ( 'ldap_server_type' , $ ldapSettings ) ) || ! ( array_key_exists ( 'network_timeout' , $ ldapSettings ) ) || ! ( array_key_exists ( 'port' , $ ldapSettings ) ) || ! ( array_key_exists ( 'recursive_groups' , $ ldapSettings ) ) || ! ( array_key_exists ( 'time_limit' , $ ldapSettings ) ) || ! ( array_key_exists ( 'use_ssl' , $ ldapSettings ) ) || ! ( array_key_exists ( 'cache_support' , $ ldapSettings ) ) || ! ( array_key_exists ( 'cache_folder' , $ ldapSettings ) ) || ! ( array_key_exists ( 'expired_password_valid' , $ ldapSettings ) ) ) { throw new UserCredentialException ( "The LDAP feature of the usercredential login service is not initialized with all parameters" , 2000 ) ; } //inject settings to the ldap handler $ this -> _passwordAuthenticationPlatformSettings = $ ldapSettings ; $ this -> initializeLdapAuthenticationHandler ( ) ; }
Check that the initialization parameters array for LDAP authentication is enriched with the
required keys

Cyril Ogana <cogana@gmail.com>
2018

@throws UserCredentialException
Check that the initialization parameters array for LDAP authentication is enriched with the required keys