diff --git a/dicos/91_ninegate.xml b/dicos/91_ninegate.xml index fe855ba2..0f6a4e92 100644 --- a/dicos/91_ninegate.xml +++ b/dicos/91_ninegate.xml @@ -102,7 +102,8 @@ LDAP - + + niveau01 @@ -694,7 +695,8 @@ AD - ninegate_addomaine + ninegate_addomainehome + ninegate_addomaineprofil diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml index b681c762..98bac823 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Resources/config/services.yml @@ -109,7 +109,8 @@ services: - %ldap_port% - %ldap_tls% - %ldap_type% - - %ldap_addomaine% + - %ldap_addomainehome% + - %ldap_addomaineprofil% calls: - [setUser, ["%ldap_user%"]] - [setPassword, ["%ldap_password%"]] diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php index 6cb37fb2..0b83aa50 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Service/ldapService.php @@ -15,7 +15,8 @@ class ldapService protected $port; protected $tls; protected $type; - protected $addomaine; + protected $addomainehome; + protected $addomaineprofil; protected $baseDN; protected $baseUser; @@ -29,13 +30,14 @@ class ldapService private $connection = null; private $ldapSync = false; - public function __construct($host, $port, $tls, $type, $addomaine) + public function __construct($host, $port, $tls, $type, $addomainehome, $addomaineprofil) { - $this->host = $host; - $this->port = $port; - $this->tls = $tls; - $this->type = $type; - $this->addomaine = $addomaine; + $this->host = $host; + $this->port = $port; + $this->tls = $tls; + $this->type = $type; + $this->addomainehome = $addomainehome; + $this->addomaineprofil = $addomaineprofil; } public function isEnabled() { @@ -316,7 +318,8 @@ class ldapService $attrs['sAMAccountName'] = $user->getUsername(); $attrs["userAccountControl"] = 544; $attrs["homeDrive"] = "U:"; - $attrs["homeDirectory"] = "\\\\".$this->addomaine."\\".$user->getUsername(); + $attrs["homeDirectory"] = "\\\\".$this->addomainehome."\\".$user->getUsername(); + $attrs["profilePath"] = "\\\\".$this->addomaineprofil."\\profiles\\".$user->getUsername(); } $attrs['givenName'] = $user->getFirstname(); diff --git a/tmpl/ninegate-template.yml b/tmpl/ninegate-template.yml index 80792440..779c182a 100644 --- a/tmpl/ninegate-template.yml +++ b/tmpl/ninegate-template.yml @@ -136,9 +136,11 @@ parameters: %end if ldap_basedn: %%ldap_base_dn %if %%getVar("ninegate_ldaptype", 'LDAP') == "AD" - ldap_addomaine: %%ninegate_addomaine + ldap_addomainehome: %%ninegate_addomainehome + ldap_addomaineprofil: %%ninegate_addomaineprofil %else - ldap_addomaine: + ldap_addomainehome: + ldap_addomaineprofil: %end if # Mise en page