|
@@ -402,11 +402,19 @@ class UsersLdapHelper {
|
|
|
$attrMap['apple-group-realname'] = 'realName';
|
|
$attrMap['apple-group-realname'] = 'realName';
|
|
|
$attrMap['apple-group-nestedgroup'] = 'nestedGroups';
|
|
$attrMap['apple-group-nestedgroup'] = 'nestedGroups';
|
|
|
|
|
|
|
|
|
|
+ if (!Config::getConfFile('default_ldap')) {
|
|
|
|
|
+ Lib::loadClass('UsersHelper');
|
|
|
|
|
+ $group = UsersHelper::getGroupByID($groupID);
|
|
|
|
|
+ if (!$group) return null;
|
|
|
|
|
+ return (object)[
|
|
|
|
|
+ 'appleUID' => $group->ID, // 'EBE2DE46-1B11-4793-BBAB-A47486B60E6C',
|
|
|
|
|
+ 'gidNumber' => $group->ID, // '1025',
|
|
|
|
|
+ 'cn' => "{$group->ID}_{$group->DESC}", // 'workgroup',
|
|
|
|
|
+ 'name' => "[{$group->ID}] {$group->DESC}", // 'Workgroup',
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
Lib::loadClass('LDAP');
|
|
Lib::loadClass('LDAP');
|
|
|
$ldap = LDAP::getInstance();
|
|
$ldap = LDAP::getInstance();
|
|
|
- if (!$ldap) {
|
|
|
|
|
- return []; // TODO: fetch user groups from zasoby
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
$filter = "(&(objectClass=apple-group)(|(cn={$groupID}-*)(cn={$groupID}_*)))";
|
|
$filter = "(&(objectClass=apple-group)(|(cn={$groupID}-*)(cn={$groupID}_*)))";
|
|
|
$attributes = array();
|
|
$attributes = array();
|