18 require_once SQ_CORE_PACKAGE_PATH.
'/users/user_group/user_group.inc';
51 if (!$ldapid || empty($data)) {
55 $ldap = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($ldapid,
'ldap_bridge');
56 if (is_null($ldap))
return;
57 $this->_ldapid = $ldapid;
60 $attrs = $ldap->attr(
'attributes');
63 $this->
id = $ldap->id.
':'.$data[
'dn'];
64 unset($data[
'objectclass'][
'count']);
65 foreach ($data[
'objectclass'] as $class) {
66 $class = strtolower($class);
67 foreach ($ldap->_group_types as $key => $value) {
69 if (!isset($attrs[$value])) {
70 $attrs[$value] = $value;
74 if (isset($data[$attrs[$value]])) {
75 $this->name = $data[$attrs[$value]][0];
81 $this->short_name = $this->name;
82 $this->status = $ldap->status;
83 $this->version =
'0.1';
85 foreach ($data as $key => $value) {
86 if (!is_array($value))
continue;
87 if (isset($value[
'count'])) unset($value[
'count']);
88 $this->vars[$key] = $value;