| @@ 423-433 (lines=11) @@ | ||
| 420 | * @param string $dn |
|
| 421 | * @return string |
|
| 422 | */ |
|
| 423 | public function getUserGroupByGid($dn) { |
|
| 424 | $groupID = $this->getUserGidNumber($dn); |
|
| 425 | if($groupID !== false) { |
|
| 426 | $groupName = $this->gidNumber2Name($groupID, $dn); |
|
| 427 | if($groupName !== false) { |
|
| 428 | return $groupName; |
|
| 429 | } |
|
| 430 | } |
|
| 431 | ||
| 432 | return false; |
|
| 433 | } |
|
| 434 | ||
| 435 | /** |
|
| 436 | * translates a primary group ID into an Nextcloud internal name |
|
| @@ 587-597 (lines=11) @@ | ||
| 584 | * @param string $dn |
|
| 585 | * @return string |
|
| 586 | */ |
|
| 587 | public function getUserPrimaryGroup($dn) { |
|
| 588 | $groupID = $this->getUserPrimaryGroupIDs($dn); |
|
| 589 | if($groupID !== false) { |
|
| 590 | $groupName = $this->primaryGroupID2Name($groupID, $dn); |
|
| 591 | if($groupName !== false) { |
|
| 592 | return $groupName; |
|
| 593 | } |
|
| 594 | } |
|
| 595 | ||
| 596 | return false; |
|
| 597 | } |
|
| 598 | ||
| 599 | /** |
|
| 600 | * Get all groups a user belongs to |
|