<?php
namespace Claromentis\Core\User\Directory\Ldap;

$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_8d9737a30f2a" . "d8eace53af3c4" . "00b8d67" => base64_decode("cHJvcGVydHlf" . "ZXhpc3Rz"), "_e0637eee9" . "05ebe3938c" . "5da50e3db1" . "0d7" => base64_decode("cGFzc3dvcm" . "Q="), "_2a463c4d041c946ca815dbab84" . "ec53de" => base64_decode("X19SRURB" . "Q1RFRF9f"), "_aed8da0f19091214b78f8" . "0351048517c" => base64_decode("c3RybG" . "Vu"), "_cdcf6e94ffc095d2953" . "8c4824c1dba56" => base64_decode("Z" . "G" . "U" . "="), "_4298577e41894bcce23f89" . "6cd365aea4" => base64_decode("Z" . "W" . "4" . "="));
use Claromentis\Core\User\Directory\DirectoriesList;
use Claromentis\Core\User\Directory\DirectorySettings;
use CryptUtils;




class LdapSettings extends DirectorySettings
{
    const GROUP_MAP_DISABLED = 0;
    const GROUP_MAP_ENABLED = 1;
    const GROUP_MAP_ENABLED_REGEX = 2;
    const GROUP_MAP_ENABLED_OU = 3;
    public $server_url;
    public $user;
    public $password;
    public $domain;
    public $base_dn;
    public $user_type_filter;
    public $user_enabled_filter;
    public $username_field;
    public $membership_field;
    public $guid_field;
    public $groups;
    public $ous;
    public $bind_by_dn = true;
    
    
    public $dn_lookup_use_com = false;
    
    
    public $sys_charset = 'utf-8';
    
    
    public $fields_map;
    public $map_profile_photo;
    
    
    public $map_cla_orgchart = null;
    
    
    public $map_cla_extranet = 'extranet_area';
    public $map_groups;
    public $map_groups_expression;
    public $date_format = '';
    public $date_no_year_format = '';
    public static function FromArray($_bc7548519088f5ca3175056c1d4b4c6d)
    {
        $_f56e92e2b328797520a80ee0c4fb95c5 = new self();
        $_f56e92e2b328797520a80ee0c4fb95c5->LoadFromArray($_bc7548519088f5ca3175056c1d4b4c6d);
        return $_f56e92e2b328797520a80ee0c4fb95c5;
    }
    public function __debugInfo()
    {
        $data = (array) $this;
        if ($GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_aed8da0f19091214b78" . "f80351048517c"]($data[$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"]["_e0637eee905ebe3938c" . "5da50e3db10d7"]]) > 0) {
            $data[$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"]["_e0637eee905ebe39" . "38c5da50e3db10d7"]] = $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_2a463c4d041c946ca815dbab8" . "4ec53de"];
        }
        
        
        return $data;
    }
    public function LoadFromArray($_bc7548519088f5ca3175056c1d4b4c6d)
    {
        foreach ($_bc7548519088f5ca3175056c1d4b4c6d as $key => $value) {
            if ($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_8d9737a30f2ad8eace53af3c40" . "0b8d67"]($this, $key)) {
                $this->{$key} = $value;
            }
        }
    }
    public function ToArray()
    {
        return (array) $this;
    }
    public function LoadFromConfigArray($_bc7548519088f5ca3175056c1d4b4c6d)
    {
        foreach ($_bc7548519088f5ca3175056c1d4b4c6d as $key => $value) {
            if ($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_8d9737a30f2ad8eace5" . "3af3c400b8d67"]($this, $key)) {
                
                
                if ($key === $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_e0637eee9" . "05ebe3938c" . "5da50e3db1" . "0d7"]) {
                    $value = CryptUtils::RC4($value, $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_cdcf6e94ffc095d29538c4824" . "c1dba56"]);
                }
                $this->{$key} = $value;
            }
        }
    }
    public function ToArrayForConfig()
    {
        $data = (array) $this;
        if (isset($data[$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_e0637eee905ebe3" . "938c5da50e3db10d" . "7"]])) {
            
            
            $data[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_e0637eee905e" . "be3938c5da50e" . "3db10d7"]] = CryptUtils::RC4($data[$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_e0637eee905ebe3938c5da50e3" . "db10d7"]], $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_4298577e41894bcce23f896c" . "d365aea4"]);
        }
        return $data;
    }
    public static function FromConfigArray($_bc7548519088f5ca3175056c1d4b4c6d)
    {
        $_f56e92e2b328797520a80ee0c4fb95c5 = new self();
        $_f56e92e2b328797520a80ee0c4fb95c5->LoadFromConfigArray($_bc7548519088f5ca3175056c1d4b4c6d);
        return $_f56e92e2b328797520a80ee0c4fb95c5;
    }
}