mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 11:06:36 +00:00
Added new API endpoints to get all user and config settings (closes #718)
This commit is contained in:
@@ -50,6 +50,19 @@ class UsersService extends BaseService
|
||||
return $returnUsers;
|
||||
}
|
||||
|
||||
public function GetUserSettinsg($userId)
|
||||
{
|
||||
$settingRow = $this->getDatabase()->user_settings()->where('user_id = :1 AND key = :2', $userId, $settingKey)->fetch();
|
||||
if ($settingRow !== null)
|
||||
{
|
||||
return $settingRow->value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function GetUserSetting($userId, $settingKey)
|
||||
{
|
||||
$settingRow = $this->getDatabase()->user_settings()->where('user_id = :1 AND key = :2', $userId, $settingKey)->fetch();
|
||||
|
Reference in New Issue
Block a user