I'm looking to embed a variable in links that passes the currently logged-in user's e-mail in the URL.
Example:
https://www.softwarepackage.com/newform?email=[$current_user_email]&othervariable=somevalue
I've come across quite a few variations of my question, but haven't been able to pin down one that I can adapt to get the functionality I'm looking for.
Hello Tim, good question right there.For you to insert the user email, you can do this:
## @noparams<a href="https://www.softwarepackage.com/newform?email=$action.remoteUser.email&othervariable=somevalue">This Link Name</a>
You will need to create a user macro with the escaped setting under macro body processing. The code above is all that is needed within the macro to return the link with the user email.The $action.remoteUser.email is responsible for returning the current user email. You can get more information on this class right here:ConfluenceActionSupportLet us know if this helps your case!
It looks like you're new here. Sign in or register to get started.