use new $autoAddObjectClasses
This commit is contained in:
parent
0e44373ffb
commit
9e36b42af0
|
@ -71,6 +71,7 @@ class sambaSamAccount extends baseModule {
|
||||||
_('Domain schema admins') => 518, _('Domain enterprise admins') => 519, _('Domain policy admins') => 520);
|
_('Domain schema admins') => 518, _('Domain enterprise admins') => 519, _('Domain policy admins') => 520);
|
||||||
// call parent constructor
|
// call parent constructor
|
||||||
parent::baseModule($scope);
|
parent::baseModule($scope);
|
||||||
|
$this->autoAddObjectClasses = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** this functin fills the error message array with messages
|
/** this functin fills the error message array with messages
|
||||||
|
@ -520,14 +521,6 @@ class sambaSamAccount extends baseModule {
|
||||||
StatusMessage("ERROR", _('No Samba 3 domains found in LDAP! Please create one first.'), '');
|
StatusMessage("ERROR", _('No Samba 3 domains found in LDAP! Please create one first.'), '');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// do not automatically add Samba 3 object class
|
|
||||||
for ($i = 0; $i < sizeof($this->attributes['objectClass']); $i++) {
|
|
||||||
if ($this->attributes['objectClass'][$i] == 'sambaSamAccount') {
|
|
||||||
unset($this->attributes['objectClass'][$i]);
|
|
||||||
$this->attributes['objectClass'] = array_values($this->attributes['objectClass']);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -559,16 +552,6 @@ class sambaSamAccount extends baseModule {
|
||||||
if (strpos($this->attributes['sambaAcctFlags'][0], "X")) $this->noexpire = true;
|
if (strpos($this->attributes['sambaAcctFlags'][0], "X")) $this->noexpire = true;
|
||||||
else $this->noexpire = false;
|
else $this->noexpire = false;
|
||||||
}
|
}
|
||||||
if (!isset($this->orig['objectClass']) || !in_array('sambaSamAccount', $this->orig['objectClass'])) {
|
|
||||||
// do not automatically add Samba 3 object class
|
|
||||||
for ($i = 0; $i < sizeof($this->attributes['objectClass']); $i++) {
|
|
||||||
if ($this->attributes['objectClass'][$i] == 'sambaSamAccount') {
|
|
||||||
unset($this->attributes['objectClass'][$i]);
|
|
||||||
$this->attributes['objectClass'] = array_values($this->attributes['objectClass']);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue