modUser.generateToken
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn moremodUser::generateToken¶
Builds the token from the site id, the User id and uniqid(). The token differs per site and per User and is unique within the request. addSessionContext() stores it as the per-context session token that getUserToken() reads.
Syntax¶
string generateToken (string $salt)
-
$salt(string) Ignored; any value satisfies the signature.
Example¶
$token = $user->generateToken('web');
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










