Hi,
I am using HTML macro in Confluence and want filter the data in a field on the basis of user who is logged in.
Can somebody help me how to detect in the html macro, the current user who is logged in Confluence? will be a great help.
Thanks
Sanan
Hi Sanan,
In Javascript, you could use AJS.params.remoteUser to get the current logged in user's username.
Hi stephen,
thanks for your reply. I will try it out and let you know what happened.
Regards
sanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stephen,
This realy works. Infact, it can work from javascript file also I have on the server.
I have one more question. AJS.params.remoteUser gives back the userid . is there any way to get the full name of user?
The data I have have is mapped to the full username . if can catch full user name in the html macro then I can just compare and match with the user name column in the datasheet.
Regards
sanan
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.
Good, you could also get it as AJS.Meta.get("current-user-fullname")
That searches through the <meta> tags on the page, which also have some extra information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, Stephen.
will definitely try your tips out.
Regards
Sanan
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.