lib/components/dataInterface/connectors/file/Module.php
public function packageNode($ous, $node)
    {
        $attributes = $node->getAttributes();
        $p = ['object' => null, 'parents' => []];
        $object = [];
        $object['id'] = isset($attributes['objectGUID']) ? md5(implode(' ', $attributes['objectGUID']->getValues())) : null;
        $object['first_name'] = isset($attributes['givenName']) ? implode(' ', $attributes['givenName']->getValues()) : null;
        $object['last_name'] = isset($attributes['sn']) ? implode(' ', $attributes['sn']->getValues()) : null;
        $object['title'] = isset($attributes['title']) ? implode(' ', $attributes['title']->getValues()) : null;
        $object['email'] = isset($attributes['mail']) ? strtolower(implode(' ', $attributes['mail']->getValues())) : null;
        $object['phone_number'] = isset($attributes['telephoneNumber']) ? strtolower(implode(' ', $attributes['telephoneNumber']->getValues())) : null;
        $object['username'] = isset($attributes['sAMAccountName']) ? strtolower(implode(' ', $attributes['sAMAccountName']->getValues())) : null;

        if (empty($object['id'])) {
            return false;
        }
        $dataSources = $this->dataSources;
        $model = $dataSources['Individual']->registerReturnForeignModel($object);
        if (!$model) {
            return false;
        }
        $object['object_individual_id'] = $model;
        $userModel = $dataSources['User']->registerReturnForeignModel($object);

        //$dataSources['User']->registerReturnForeignModel($object);
        $p['object'] = $model;
        $p['parents'] = $this->discoverParents($ous, $node);
        foreach ($p['parents'] as $parent) {
            $parent->foreignObject->addChild($model);
        }

        return $p;
    }
public function packageNode($ous, $node)
    {
        $attributes = $node->getAttributes();
        $p = ['object' => null, 'parents' => []];
        $object = [];
        $object['id'] = isset($attributes['objectGUID']) ? md5(implode(' ', $attributes['objectGUID']->getValues())) : null;
        $object['first_name'] = isset($attributes['givenName']) ? implode(' ', $attributes['givenName']->getValues()) : null;
        $object['last_name'] = isset($attributes['sn']) ? implode(' ', $attributes['sn']->getValues()) : null;
        $object['title'] = isset($attributes['title']) ? implode(' ', $attributes['title']->getValues()) : null;
        $object['email'] = isset($attributes['mail']) ? strtolower(implode(' ', $attributes['mail']->getValues())) : null;
        $object['phone_number'] = isset($attributes['telephoneNumber']) ? strtolower(implode(' ', $attributes['telephoneNumber']->getValues())) : null;
        $object['username'] = isset($attributes['sAMAccountName']) ? strtolower(implode(' ', $attributes['sAMAccountName']->getValues())) : null;

        if (empty($object['id'])) {
            return false;
        }
        $dataSources = $this->dataSources;
        $model = $dataSources['Individual']->registerReturnForeignModel($object);
        if (!$model) {
            return false;
        }
        $object['object_individual_id'] = $model;
        $userModel = $dataSources['User']->registerReturnForeignModel($object);

        //$dataSources['User']->registerReturnForeignModel($object);
        $p['object'] = $model;
        $p['parents'] = $this->discoverParents($ous, $node);
        foreach ($p['parents'] as $parent) {
            $parent->foreignObject->addChild($model);
        }

        return $p;
    }
[[@doctodo method_description:packageNode]].

@param [[@doctodo param_type:ous]]  $ous  [[@doctodo param_description:ous]]
@param [[@doctodo param_type:node]] $node [[@doctodo param_description:node]]

@return [[@doctodo return_type:packageNode]] [[@doctodo return_description:packageNode]]