Code Duplication    Length = 8-8 lines in 2 locations

lib/private/legacy/user.php 2 locations

@@ 459-466 (lines=8) @@
456
	 * @param integer $limit
457
	 * @param integer $offset
458
	 */
459
	public static function getUsers($search = '', $limit = null, $offset = null) {
460
		$users = \OC::$server->getUserManager()->search($search, $limit, $offset);
461
		$uids = array();
462
		foreach ($users as $user) {
463
			$uids[] = $user->getUID();
464
		}
465
		return $uids;
466
	}
467
468
	/**
469
	 * Get a list of all users display name
@@ 479-486 (lines=8) @@
476
	 * Get a list of all display names and user ids.
477
	 * @deprecated Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead.
478
	 */
479
	public static function getDisplayNames($search = '', $limit = null, $offset = null) {
480
		$displayNames = array();
481
		$users = \OC::$server->getUserManager()->searchDisplayName($search, $limit, $offset);
482
		foreach ($users as $user) {
483
			$displayNames[$user->getUID()] = $user->getDisplayName();
484
		}
485
		return $displayNames;
486
	}
487
488
	/**
489
	 * check if a user exists