mirror of
https://github.com/grocy/grocy.git
synced 2025-08-24 14:06:44 +00:00
Filtering of API-Results (#985)
* Add FilteredApiResponse * Use FilteredApiResponse for Generic-Entity-Search * Use FilteredApiResponse for Recipe-Fullfillment * Use FilteredApiResponse for GetUsers * Use FilteredApiResponse for current Tasks * Use FilteredApiResponse for ProductStockEntries & ProductStockLocations * Use FilteredApiResponse for current chores * Use FilteredApiResponse for batteries-current * Fix missing highlighting of "< X days" * Keep to use existing views Co-authored-by: Bernd Bestel <bernd@berrnd.de>
This commit is contained in:
committed by
GitHub
parent
60f3d900e8
commit
32a4f81f62
@@ -81,19 +81,9 @@ class UsersService extends BaseService
|
||||
return array_merge($GROCY_DEFAULT_USER_SETTINGS, $settings);
|
||||
}
|
||||
|
||||
public function GetUsersAsDto()
|
||||
public function GetUsersAsDto(): \LessQL\Result
|
||||
{
|
||||
$users = $this->getDatabase()->users();
|
||||
$returnUsers = [];
|
||||
|
||||
foreach ($users as $user)
|
||||
{
|
||||
unset($user->password);
|
||||
$user->display_name = GetUserDisplayName($user);
|
||||
$returnUsers[] = $user;
|
||||
}
|
||||
|
||||
return $returnUsers;
|
||||
return $this->getDatabase()->users_dto();
|
||||
}
|
||||
|
||||
public function SetUserSetting($userId, $settingKey, $settingValue)
|
||||
|
Reference in New Issue
Block a user