Hi Experts,
who can tell me, if the parameter "username" of the macro "content by user" can be set dynamic?
I'll design a page with the user macro "content by user" an it should be displayed the content of the current user, who is loggin in and visit this page.
Is there any solution for this demand?
Thank you so much
Ralf
Hi Ralf,
Perhaps the scripting plugin is a security issue, but how about a user macro? If you are using confluence 5.2 or higher, this will work:
## @noparams <ac:structured-macro ac:name="content-by-user"> <ac:parameter ac:name=""> <ri:user ri:userkey="${action.authenticatedUser.key}"/> </ac:parameter> </ac:structured-macro>
You could call it "Content by Current User" or something like that.
Best regards,
Stephen
Hi,
added the user macro but unfortunately it returns the error message 'Error rendering macro 'content-created-by-current-user' : null' (Confluence 5.8.5)
Did anyone face the same problem - and found a way to solve it?
BR, Anne
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And nothing is displayed in 5.8.9.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry, but I simply don't have enough time to fire up a test instance right now. Maybe I'll get a chance later in the week to try and fix it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I created it in 5.5.6 and 5.8.6 and it works fine in both.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally works! You have to set the Macro Body Processing to 'Escaped' - NOT to 'No Macro Body'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Macro Body Processing should really be set to "No macro body" as you are not embedding anything inside the user macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know you can do it if you use the Scripting Pluigin to get the current user and then output the content by user macro as wiki.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I used this user-macro and got error for LDAP users. Error "rendering macro 'content-by-user' : null" . We are using confluence 5.8.6 Server and Crowd integrated with LDAP. (For Non LDAP user this user-macro worked)
## @noparams
<ac:structured-macro ac:name="content-by-user">
<ac:parameter ac:name="">
<ri:user ri:userkey="${action.authenticatedUser.key}"/>
</ac:parameter>
</ac:structured-macro>
Is userkey for systems using LDAP/Crowd different?. Any suggestion to solve this?.
Thx
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your help, finally got it to work. Now 'll start restricting it by type (page, blog post, comment) - any hints for that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have the Run Self-Service Reports for Confluence plugin, embed the Content by User macro in a Run without a user form macro. Specify $current_user_id as the user.
This has been been tested in 5.4.4 and 5.8.6.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure that works too, but the above example is free and less involved as you need only one macro on that page that doesn't need any params.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are correct. The challenge is that user macros in Confluence aren't really user macros. They are "defined by administrator" macros. The Run Self Service Reports alternative is usable by non-administrators if the appropriate plugin is already in place. It's also easily generalizable to allow selecting from a list of users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi , I used this user-macro and got error for LDAP users. Error "rendering macro 'content-by-user' : null" . We are using confluence 5.8.6 Server and Crowd integrated with LDAP. (For Non LDAP user this user-macro worked) ## @noparams <ac:structured-macro ac:name="content-by-user"> <ac:parameter ac:name=""> <ri:user ri:userkey="${action.authenticatedUser.key}"/> </ac:parameter> </ac:structured-macro> Is userkey for systems using LDAP/Crowd different?. Any suggestion to solve this?. Thx
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.
Thank you so much, but we can't use this. it is question of security and the policy says NO.
Best regards,
Ralf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is a question of security? The answer by Stephen Deutsch doesn't open any security holes. You are not adding in any foreign code or anything like that. It is using only built-in functionality.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If I remember correctly, I think he was referring to Timothy Chin's answer :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah ... ok! I was looking at the dates of the posts and it looked to me like he was referring to your ... kinda confused me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.