Provides a random token and stores it in the session. You can also provide a specific key to store in the session.

CSRFGenerateToken( key=string, forceNew=boolean );

Returns: String

Argument Description
string, optional

A random token is generated for the key provided.

boolean, optional

If set to true, a new token is generated every time the function is called.

If false, in case a token exists for the key, the same key is returned.


dump(CSRFGenerateToken("+nn7jqV+3hYHM++RuvE47g==", true));

See also