Documentation

SaveUserPreferences

Use case for saving user-scoped preferences from form data.

In multi-user mode, saves with the current user's ID. In single-user mode, saves to the global row (StUsID=0).

Tags
since
3.0.0

Table of Contents

Methods

execute()  : array{success: bool}
Execute the use case - save user preferences from request.
executeFromData()  : array{success: bool}
Save preferences from an array rather than the request.

Methods

execute()

Execute the use case - save user preferences from request.

public execute() : array{success: bool}
Return values
array{success: bool}

executeFromData()

Save preferences from an array rather than the request.

public executeFromData(array<string, mixed> $data) : array{success: bool}

The API-friendly twin of execute(). Only keys the definitions declare as user-scoped are written, so an unexpected key in the payload is ignored rather than becoming a setting.

Parameters
$data : array<string, mixed>

Settings keyed by name

Return values
array{success: bool}
On this page

Search results