Code Duplication    Length = 8-8 lines in 2 locations

lib/private/legacy/user.php 2 locations

@@ 509-516 (lines=8) @@
506
	 * @param integer $limit
507
	 * @param integer $offset
508
	 */
509
	public static function getUsers($search = '', $limit = null, $offset = null) {
510
		$users = \OC::$server->getUserManager()->search($search, $limit, $offset);
511
		$uids = array();
512
		foreach ($users as $user) {
513
			$uids[] = $user->getUID();
514
		}
515
		return $uids;
516
	}
517
518
	/**
519
	 * Get a list of all users display name
@@ 529-536 (lines=8) @@
526
	 * Get a list of all display names and user ids.
527
	 * @deprecated Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead.
528
	 */
529
	public static function getDisplayNames($search = '', $limit = null, $offset = null) {
530
		$displayNames = array();
531
		$users = \OC::$server->getUserManager()->searchDisplayName($search, $limit, $offset);
532
		foreach ($users as $user) {
533
			$displayNames[$user->getUID()] = $user->getDisplayName();
534
		}
535
		return $displayNames;
536
	}
537
538
	/**
539
	 * check if a user exists