|
@@ 379-386 (lines=8) @@
|
| 376 |
|
* @param integer $limit |
| 377 |
|
* @param integer $offset |
| 378 |
|
*/ |
| 379 |
|
public static function getUsers($search = '', $limit = null, $offset = null) { |
| 380 |
|
$users = \OC::$server->getUserManager()->search($search, $limit, $offset); |
| 381 |
|
$uids = array(); |
| 382 |
|
foreach ($users as $user) { |
| 383 |
|
$uids[] = $user->getUID(); |
| 384 |
|
} |
| 385 |
|
return $uids; |
| 386 |
|
} |
| 387 |
|
|
| 388 |
|
/** |
| 389 |
|
* Get a list of all users display name |
|
@@ 399-406 (lines=8) @@
|
| 396 |
|
* Get a list of all display names and user ids. |
| 397 |
|
* @deprecated Use \OC::$server->getUserManager->searchDisplayName($search, $limit, $offset) instead. |
| 398 |
|
*/ |
| 399 |
|
public static function getDisplayNames($search = '', $limit = null, $offset = null) { |
| 400 |
|
$displayNames = array(); |
| 401 |
|
$users = \OC::$server->getUserManager()->searchDisplayName($search, $limit, $offset); |
| 402 |
|
foreach ($users as $user) { |
| 403 |
|
$displayNames[$user->getUID()] = $user->getDisplayName(); |
| 404 |
|
} |
| 405 |
|
return $displayNames; |
| 406 |
|
} |
| 407 |
|
|
| 408 |
|
/** |
| 409 |
|
* Returns the first active backend from self::$_usedBackends. |