Code Duplication    Length = 11-11 lines in 2 locations

apps/user_ldap/lib/Group_LDAP.php 2 locations

@@ 418-428 (lines=11) @@
415
	 * @param string $dn
416
	 * @return string
417
	 */
418
	public function getUserGroupByGid($dn) {
419
		$groupID = $this->getUserGidNumber($dn);
420
		if($groupID !== false) {
421
			$groupName = $this->gidNumber2Name($groupID, $dn);
422
			if($groupName !== false) {
423
				return $groupName;
424
			}
425
		}
426
427
		return false;
428
	}
429
430
	/**
431
	 * translates a primary group ID into an Nextcloud internal name
@@ 582-592 (lines=11) @@
579
	 * @param string $dn
580
	 * @return string
581
	 */
582
	public function getUserPrimaryGroup($dn) {
583
		$groupID = $this->getUserPrimaryGroupIDs($dn);
584
		if($groupID !== false) {
585
			$groupName = $this->primaryGroupID2Name($groupID, $dn);
586
			if($groupName !== false) {
587
				return $groupName;
588
			}
589
		}
590
591
		return false;
592
	}
593
594
	/**
595
	 * Get all groups a user belongs to