session_addVar

Adds a variable to session storage.

Target function

Signature

1session_addVar(sessionName::string, varName::string)

Adds a variable to session storage.

session_addVar is a global callable that can be used wherever an expression is valid. session_addVar works with request identity or stored session state. Keep authorization checks close to the action they protect.

Parameters

sessionName
Required value of type string. Supply sessionName positionally unless the signature shows a keyword form.
varName
Required value of type string. Supply varName positionally unless the signature shows a keyword form.

Examples

Basic call

1session_addVar('sid', 'user_id')
The example shows the normal call shape. Adapt variable names, validation, and surrounding error handling to the context.