get current user from actioncontext in javascript

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2007 10:04 AM
Hi,
I need some help accomplishing the following:
I created a custom action, Subscribe, and added it to the space menu. This action triggers a javascript and gets actionContext.id as it's parameter. Using search.findnode I can find the node.
In the script I would also like to get the current user.
How can I do this?
Where can I find more info about the actionContext object.
Can I pass other (actionObject) properties, i.e. current user, as a parameter.
What I need eventually is e-mail subscription functionality with which a user can subscribe himself to a space
Thanks in advance for any info!
Regards, Berno.
I need some help accomplishing the following:
I created a custom action, Subscribe, and added it to the space menu. This action triggers a javascript and gets actionContext.id as it's parameter. Using search.findnode I can find the node.
In the script I would also like to get the current user.
How can I do this?
Where can I find more info about the actionContext object.
Can I pass other (actionObject) properties, i.e. current user, as a parameter.
What I need eventually is e-mail subscription functionality with which a user can subscribe himself to a space
Thanks in advance for any info!
Regards, Berno.
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2007 10:36 AM
There is an object in the default script model called 'person' - it represents the current user node - see the javascript API docs for info on the objects available.
You can pass values from the actionContext node such as a property value e.g. actionContext.properties["cm:description"].
Thanks,
Kevin
You can pass values from the actionContext node such as a property value e.g. actionContext.properties["cm:description"].
Thanks,
Kevin
