Is there a pronoun for "the currently logged in user"?

In a recent question, one answer was to insert a macro for user content. Essentially,

{content-by-user:user.name}

 Is there a pronoun that will always resolve to the current user? That is, so each user can see content based on their own username?

1 answer

1 accepted

2 votes

Hi Shaun,

you can write a wrapper around this macro.

Create a new user macro, call it e.g. content-by-logged-in-user.

The macro has no body and this template:

## Macro title: content-by-logged-in-user
##
## Developed by: Thomas Schlegel
## @noparams

#set($userkey=$action.getRemoteUser().getKey())

<p>
<ac:structured-macro ac:name="content-by-user" ac:schema-version="1">
<ac:parameter ac:name="">
<ri:user ri:userkey="$userkey"/>
</ac:parameter>
</ac:structured-macro>
</p>

OK. I was hoping for something built in, but I understand. (Wanders off to figure out how to create a macro...)

Thomas Schlegel Community Champion Dec 11, 2017

@Shaun Griffith

Creating a user macro is not such a big thing. Maybe my article might help you with that:

https://community.atlassian.com/t5/Confluence-articles/The-Admin-s-tale-User-Macro-filtering-a-Confluence-table/ba-p/459369

This is about creating a user macro for another purpose, but the basics are the same.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

621 views 21 11
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you