Code Duplication    Length = 8-8 lines in 2 locations

lib/private/legacy/user.php 2 locations

@@ 423-430 (lines=8) @@
420
	 * @param integer $limit
421
	 * @param integer $offset
422
	 */
423
	public static function getUsers($search = '', $limit = null, $offset = null) {
424
		$users = \OC::$server->getUserManager()->search($search, $limit, $offset);
425
		$uids = array();
426
		foreach ($users as $user) {
427
			$uids[] = $user->getUID();
428
		}
429
		return $uids;
430
	}
431
432
	/**
433
	 * Get a list of all users display name
@@ 443-450 (lines=8) @@
440
	 * Get a list of all display names and user ids.
441
	 * @deprecated Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead.
442
	 */
443
	public static function getDisplayNames($search = '', $limit = null, $offset = null) {
444
		$displayNames = array();
445
		$users = \OC::$server->getUserManager()->searchDisplayName($search, $limit, $offset);
446
		foreach ($users as $user) {
447
			$displayNames[$user->getUID()] = $user->getDisplayName();
448
		}
449
		return $displayNames;
450
	}
451
452
	/**
453
	 * check if a user exists