How to get the user's name from a custom dialog?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2010 01:00 AM
Hello all,
I implemented a custom dialog by extending BaseDialogBean as seen on the wiki:
http://wiki.alfresco.com/wiki/Adding_a_Custom_Dialog
In the Java code, I need the id of the current user.
It is probably easy but I could not find where to get this information… I tried a mix of Application.getCurrentUser, this.getActionsContext(), and the methods inherited from BaseDialogBean, but did not find a way to get it… User name or user id or anything that could identify the Alfresco web client user.
Thanks a lot!
I implemented a custom dialog by extending BaseDialogBean as seen on the wiki:
http://wiki.alfresco.com/wiki/Adding_a_Custom_Dialog
In the Java code, I need the id of the current user.
It is probably easy but I could not find where to get this information… I tried a mix of Application.getCurrentUser, this.getActionsContext(), and the methods inherited from BaseDialogBean, but did not find a way to get it… User name or user id or anything that could identify the Alfresco web client user.
Thanks a lot!
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2010 02:44 AM
Try this my friend:
AuthenticationUtil.getFullyAuthenticatedUser() and this returns the username
AuthenticationUtil.getFullyAuthenticatedUser() and this returns the username
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2010 02:42 AM
Thanks my friend!
It gives the name of the current user as a String, such as "admin".
Class is org.alfresco.repo.security.authentication.AuthenticationUtil
That's exactly what I needed 🙂
Thanks again!
Nicolas Raoul
It gives the name of the current user as a String, such as "admin".
Class is org.alfresco.repo.security.authentication.AuthenticationUtil
That's exactly what I needed 🙂
Thanks again!
Nicolas Raoul
