The easy way would be to append the ID to the URL for use with $_GET, though that would expose the user ID.
I think it would be:
<a href="[[~23? &userId=`[[+id]]`]]"
How about putting a form in the Tpl chunk with no visible fields (and the user ID as a hidden field). It's submit button would be the only thing showing and the "action" would be the UpdateProfile page.
I think you're going to have to modify the UpdateProfile snippet code no matter what, and it could read the $_POST array for the user's ID rather than using $modx->user. The user ID would still be visible in "View Source" but at least it wouldn't appear in the URL.
If you really need to hide the user ID, I think you could use a snippet that set a $_SESSION variable. So, in the Tpl chunk, you'd have this somewhere outside what you have now:
[[!SetUserId? &userId = `[[+id]]` ]]
Then in the SetUserId snippet:
<?php
$_SESSION['userId'] = $scriptProperties['userId'];
return '';
The snippets should all execute before the page rendered.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
[ed. note: BobRay last edited this post 14 years, 1 month ago.]