|
@@ -326,7 +326,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private function _getGroupIdFromUid($groupUid) {
|
|
|
|
|
|
|
+ public function getGroupIdFromUid($groupUid) {
|
|
|
if (empty($groupUid)) return null;
|
|
if (empty($groupUid)) return null;
|
|
|
if (!is_numeric(substr($groupUid, 0, 1))) return null;
|
|
if (!is_numeric(substr($groupUid, 0, 1))) return null;
|
|
|
|
|
|
|
@@ -381,7 +381,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
$group = new ObjectGroupLdap('MacOSX');
|
|
$group = new ObjectGroupLdap('MacOSX');
|
|
|
$group->primaryKey = $groupLdap->cn;
|
|
$group->primaryKey = $groupLdap->cn;
|
|
|
$group->realName = V::get('realName', '', $groupLdap);
|
|
$group->realName = V::get('realName', '', $groupLdap);
|
|
|
- $group->zasobID = $this->_getGroupIdFromUid($groupLdap->cn);
|
|
|
|
|
|
|
+ $group->zasobID = $this->getGroupIdFromUid($groupLdap->cn);
|
|
|
$group->type = 'unknown';// TODO: try to fetch from name or from ldap attribute
|
|
$group->type = 'unknown';// TODO: try to fetch from name or from ldap attribute
|
|
|
if ($groupLdap->cn == 'workgroup') $group->type = 'network';
|
|
if ($groupLdap->cn == 'workgroup') $group->type = 'network';
|
|
|
if ($fetchNested && !empty($groupLdap->nestedGroups)) {
|
|
if ($fetchNested && !empty($groupLdap->nestedGroups)) {
|
|
@@ -484,7 +484,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
foreach ($groupsCmd as $group) {
|
|
foreach ($groupsCmd as $group) {
|
|
|
$groupsAll[] = $group;
|
|
$groupsAll[] = $group;
|
|
|
|
|
|
|
|
- $groupID = $this->_getGroupIdFromUid($group);
|
|
|
|
|
|
|
+ $groupID = $this->getGroupIdFromUid($group);
|
|
|
if (!empty($groupID)) {
|
|
if (!empty($groupID)) {
|
|
|
$groups[$groupID] = $group;
|
|
$groups[$groupID] = $group;
|
|
|
}
|
|
}
|
|
@@ -659,7 +659,7 @@ class UserStorageMacOSX extends UserStorageBase {
|
|
|
}
|
|
}
|
|
|
if (!empty($cmdOut)) {
|
|
if (!empty($cmdOut)) {
|
|
|
foreach ($cmdOut as $vGroupUid) {
|
|
foreach ($cmdOut as $vGroupUid) {
|
|
|
- $vGroupID = $this->_getGroupIdFromUid($vGroupUid);
|
|
|
|
|
|
|
+ $vGroupID = $this->getGroupIdFromUid($vGroupUid);
|
|
|
if (!empty($vGroupID) && $vGroupID == $groupUid) {
|
|
if (!empty($vGroupID) && $vGroupID == $groupUid) {
|
|
|
$groupRealUid = $vGroupUid;
|
|
$groupRealUid = $vGroupUid;
|
|
|
break;
|
|
break;
|