fixed objectclass setting for upload

This commit is contained in:
Roland Gruber 2004-09-21 18:32:44 +00:00
parent a7146384fd
commit afa8899ad3
2 changed files with 2 additions and 2 deletions

View File

@ -424,7 +424,7 @@ function buildUploadAccounts($scope, $data, $ids) {
// give raw data to modules
$errors = array();
$partialAccounts = array();
for ($i = 0; $i < sizeof($data); $i++) $partialAccounts[$i]['objectClasses'] = array();
for ($i = 0; $i < sizeof($data); $i++) $partialAccounts[$i]['objectClass'] = array();
for ($i = 0; $i < sizeof($ordered); $i++) {
$module = new $ordered[$i]($scope);
$errors = $module->build_uploadAccounts($data, $ids, $partialAccounts);

View File

@ -55,7 +55,7 @@ class posixGroup extends baseModule {
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts) {
$errors = array();
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
if (!in_array("posixGroup", $partialAccounts[$i]['objectClasses'])) $partialAccounts[$i]['objectClasses'][] = "posixGroup";
if (!in_array("posixGroup", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "posixGroup";
if (eregi(".*", $rawAccounts[$i][$ids['posixGroup_cn']])) { // TODO use real regex for group name
$partialAccounts[$i]['cn'] = $rawAccounts[$i][$ids['posixGroup_cn']];
}