Code Duplication    Length = 8-8 lines in 2 locations

lib/private/legacy/user.php 2 locations

@@ 496-503 (lines=8) @@
493
	 * @param integer $limit
494
	 * @param integer $offset
495
	 */
496
	public static function getUsers($search = '', $limit = null, $offset = null) {
497
		$users = \OC::$server->getUserManager()->search($search, $limit, $offset);
498
		$uids = array();
499
		foreach ($users as $user) {
500
			$uids[] = $user->getUID();
501
		}
502
		return $uids;
503
	}
504
505
	/**
506
	 * Get a list of all users display name
@@ 516-523 (lines=8) @@
513
	 * Get a list of all display names and user ids.
514
	 * @deprecated Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead.
515
	 */
516
	public static function getDisplayNames($search = '', $limit = null, $offset = null) {
517
		$displayNames = array();
518
		$users = \OC::$server->getUserManager()->searchDisplayName($search, $limit, $offset);
519
		foreach ($users as $user) {
520
			$displayNames[$user->getUID()] = $user->getDisplayName();
521
		}
522
		return $displayNames;
523
	}
524
525
	/**
526
	 * check if a user exists