Added new API endpoints to get all user and config settings (closes #718)

This commit is contained in:
Bernd Bestel
2020-04-13 10:35:20 +02:00
parent b971375881
commit 42e6a8ef94
6 changed files with 127 additions and 7 deletions

View File

@@ -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();