Code Duplication    Length = 8-8 lines in 2 locations

lib/private/legacy/user.php 2 locations

@@ 434-441 (lines=8) @@
431
	 * @param integer $limit
432
	 * @param integer $offset
433
	 */
434
	public static function getUsers($search = '', $limit = null, $offset = null) {
435
		$users = \OC::$server->getUserManager()->search($search, $limit, $offset);
436
		$uids = array();
437
		foreach ($users as $user) {
438
			$uids[] = $user->getUID();
439
		}
440
		return $uids;
441
	}
442
443
	/**
444
	 * Get a list of all users display name
@@ 454-461 (lines=8) @@
451
	 * Get a list of all display names and user ids.
452
	 * @deprecated Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead.
453
	 */
454
	public static function getDisplayNames($search = '', $limit = null, $offset = null) {
455
		$displayNames = array();
456
		$users = \OC::$server->getUserManager()->searchDisplayName($search, $limit, $offset);
457
		foreach ($users as $user) {
458
			$displayNames[$user->getUID()] = $user->getDisplayName();
459
		}
460
		return $displayNames;
461
	}
462
463
	/**
464
	 * check if a user exists