I see many of snippets and sample expressions tossed around on this site, but no single coherent example for a non-programmer like myself.
I just want a user macro that will return the current username (not the full name). I want to feed this in to an sql query that will pull information about this user out of a local database.
Come on, easy points for some advanced technician out there! Thanks, R.M.
P.S. Extra points (unofficially) for pointers to some documentation that would show me how to do this myself.
Community moderators have prevented the ability to post new answers.
## Macro title: my-username ## Macro has a body: N ## Body processing: Selected body processing option ## Output: Selected output option ## ## Developed by: My Name ## Date created: dd/mm/yyyy ## Installed by: My Name $action.remoteUser.name
Hi, Can i get sample code for displaying current date? I've tried $getDateFormat() and other stuff but it doesnt work! May be im missing something....
Thanks,
Avinash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To find out which Java objects are exposed in velocity and thus help you with writing your own user macro, I'd recommend:
https://developer.atlassian.com/display/CONFDEV/Confluence+Objects+Accessible+From+Velocity
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{tip:title=this works for me}
Current user fullname: {user-info:fullname}
Current userid: {user-info:username}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No it didn't! This returns information about the user that created the page, not the current user. Is there another example that would work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.