Merge pull request #1914 from aternatik/fix_ldapgrp
Fix: gidNumber ldap attribute was not defined
This commit is contained in:
commit
8121aeb0b6
@ -219,6 +219,10 @@ if (function_exists("ldap_connect"))
|
||||
$info=$object->_load_ldap_info();
|
||||
$dn=$object->_load_ldap_dn($info);
|
||||
|
||||
// Get a gid number for objectclass PosixGroup
|
||||
if(in_array('posixGroup',$info['objectclass']))
|
||||
$info['gidNumber'] = $ldap->getNextGroupGid();
|
||||
|
||||
$result1=$ldap->delete($dn); // To be sure to delete existing records
|
||||
$result2=$ldap->add($dn,$info,$user); // Now the test
|
||||
$result3=$ldap->delete($dn); // Clean what we did
|
||||
|
||||
@ -64,6 +64,10 @@ if ($action == 'dolibarr2ldap')
|
||||
$result=$ldap->connect_bind();
|
||||
|
||||
$info=$fgroup->_load_ldap_info();
|
||||
// Get a gid number for objectclass PosixGroup
|
||||
if(in_array('posixGroup',$info['objectclass']))
|
||||
$info['gidNumber'] = $ldap->getNextGroupGid();
|
||||
|
||||
$dn=$fgroup->_load_ldap_dn($info);
|
||||
$olddn=$dn; // We can say that old dn = dn as we force synchro
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user