add parent object classes for new accounts

This commit is contained in:
Roland Gruber 2007-11-14 09:12:27 +00:00
parent a6c2552322
commit 5a1d88bf59
1 changed files with 9 additions and 0 deletions

View File

@ -488,6 +488,15 @@ class inetOrgPerson extends baseModule {
*/
function process_attributes() {
$errors = array();
// add parent object classes
if ($this->getAccountContainer()->isNewAccount) {
if (!in_array('organizationalPerson', $this->attributes['objectClass'])) {
$this->attributes['objectClass'][] = 'organizationalPerson';
}
if (!in_array('person', $this->attributes['objectClass'])) {
$this->attributes['objectClass'][] = 'person';
}
}
// Load attributes
$this->attributes['description'][0] = $_POST['description'];
$this->attributes['sn'][0] = $_POST['sn'];