mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix: doc blocks added
Signed-off-by: yemkareems <yemkareems@gmail.com>
This commit is contained in:
parent
695bd042d7
commit
5b249df686
4 changed files with 22 additions and 0 deletions
|
|
@ -491,6 +491,14 @@ class AllConfig implements IConfig {
|
|||
return $userIDs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the list of users based on their lastLogin info asc or desc
|
||||
*
|
||||
* @param string $search search users based on search params
|
||||
* @param string $sortMode can be lastLogin or any key in preferences
|
||||
* @param string $sortOrder asc or desc
|
||||
* @return array of user IDs
|
||||
*/
|
||||
public function getLastLoggedInUsers($search, $sortMode, $sortOrder): array {
|
||||
// TODO - FIXME
|
||||
$this->fixDIInit();
|
||||
|
|
|
|||
|
|
@ -342,6 +342,9 @@ class Manager extends PublicEmitter implements IUserManager {
|
|||
return array_slice($users, $offset, $limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return IUser[]
|
||||
*/
|
||||
public function getUsersSortedByLastLogin(?int $limit = null, int $offset = 0, $search = '', $sortMode = 'lastLogin', $sortOrder = 'desc'): array {
|
||||
$users = $this->config->getLastLoggedInUsers($search, $sortMode, $sortOrder);
|
||||
$users = array_combine(
|
||||
|
|
|
|||
|
|
@ -250,5 +250,13 @@ interface IConfig {
|
|||
*/
|
||||
public function getUsersForUserValue($appName, $key, $value);
|
||||
|
||||
/**
|
||||
* Gets the list of users based on their lastLogin info asc or desc
|
||||
*
|
||||
* @param string $search search users based on search params
|
||||
* @param string $sortMode can be lastLogin or any key in preferences
|
||||
* @param string $sortOrder asc or desc
|
||||
* @return array of user IDs
|
||||
*/
|
||||
public function getLastLoggedInUsers($search, $sortMode, $sortOrder);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,6 +124,9 @@ interface IUserManager {
|
|||
*/
|
||||
public function getDisabledUsers(?int $limit = null, int $offset = 0, string $search = ''): array;
|
||||
|
||||
/**
|
||||
* @return IUser[]
|
||||
*/
|
||||
public function getUsersSortedByLastLogin(?int $limit = null, int $offset = 0, $search = '', $sortMode = 'lastLogin', $sortOrder = 'desc'): array;
|
||||
/**
|
||||
* Search known users (from phonebook sync) by displayName
|
||||
|
|
|
|||
Loading…
Reference in a new issue