public static function getExtensionOptions($optionName) {        
        //try yii2 params
        if (isset(Yii::$app->params['yii2-adldap-extension-Options']) &&
            is_array(Yii::$app->params['yii2-adldap-extension-Options']) && 
            array_key_exists($optionName, Yii::$app->params['yii2-adldap-extension-Options'])) 
        {
            return Yii::$app->params['yii2-adldap-extension-Options'][$optionName];
        }
        
        //default from distribution
        else if (array_key_exists($optionName, static::EXTENSION_OPTIONS_DEFAULT)) {
            return static::EXTENSION_OPTIONS_DEFAULT[$optionName];
        } 
        
        //Exception
        else {
            throw new \yii\base\Exception('Extension-Option ' . $optionName . ' not found. Please define settings in the config/params.php of the yii2 framework as described on top of the UserDbLdap.php');   
        }
    }