Skip to content

Custom service user EN

Nicolas edited this page Oct 8, 2020 · 1 revision

User object

It can sometimes be tedious to access tarteaucitron external variables in tarteaucitron or on the contrary to access internal tarteaucitron variables outside of tarteaucitron (it makes a lot of tarteaucitron).

The user object is there for this utility, it makes it possible to make variables accessible both by tarteaucitron and both by the rest of the code.

This is useful, for example when your ridge calls a script with the tarteaucitron.AddScript () function and you need to provide a parameter in the URL of this script.

If for some reason this parameter and store in a variable outside of tarteaucitron, you can simply store this variable in the user object like this :

tarteaucitron.user = myVar;

This variable is now accessible both outside and inside the tarteaucitron code with tarteaucitron.user.myVar


Previous page