LimeSurvey API - Master branch

ProxySettingsUser
in package

ProxySettingsUser Service

Wraps static methods on SettingsUser to make them injectable to other services.

Table of Contents

Methods

deleteUserSetting()  : bool
Deletes user setting
getUserSettingValue()  : mixed|null
Gets a user settings value depending on the given parameters Shorthand function
setUserSetting()  : bool
Changes or creates a user setting

Methods

deleteUserSetting()

Deletes user setting

public static deleteUserSetting(string $stg_name[, int $uid = null ][, string $entity = null ][, int $entity_id = null ]) : bool
Parameters
$stg_name : string
$uid : int = null

| Can be omitted to just take the currently logged in users id

$entity : string = null

| optional defaults to 'null'

$entity_id : int = null

| optional defaults to 'null'

Return values
bool

Deleting success/failure

getUserSettingValue()

Gets a user settings value depending on the given parameters Shorthand function

public getUserSettingValue(string $stg_name[, int|null $uid = null ][, int|null $entity = null ][, int|null $entity_id = null ][, mixed $default = null ]) : mixed|null
Parameters
$stg_name : string
$uid : int|null = null

| Can be omitted to just take the currently logged in users id

$entity : int|null = null

| optional defaults to 'null'

$entity_id : int|null = null

| optional defaults to 'null'

$default : mixed = null

| optional defaults to 'null'

Return values
mixed|null

The current settings value or null id there is no setting

setUserSetting()

Changes or creates a user setting

public static setUserSetting(string $stg_name, int $stg_value[, int $uid = null ][, string $entity = null ][, int $entity_id = null ]) : bool
Parameters
$stg_name : string
$stg_value : int
$uid : int = null

| Can be omitted to just take the currently logged in users id

$entity : string = null

| optional defaults to 'null'

$entity_id : int = null

| optional defaults to 'null'

Return values
bool

Saving success/failure


        
On this page

Search results