Is it possible to retrieve details about the user making the request?
I want to allow users to register on my site. This will result in a
user node being created under /users possible with the node name equal
to their email address. For instance /users/[hidden email].
Once the user has registered and signed in they would be able to
access/edit content under their node accessible via link on a webpage.
While generating these links in my GET.jsp how can I find the
[hidden email] of the user making the request?
The users email address may not be the best node name probably better
to user first and last name or a unique user name. In fact looking at
the jackrabbit-usermanager bundel the name of the user supplied when
creating the user would be a good node name. But I digress.
How to get the username of the user making the request in my jsp file?
> On Tue, Oct 13, 2009 at 14:32, Ben Short <[hidden email]> wrote:
>> How to get the username of the user making the request in my jsp file?
> When logged in to the JCR (which is the default way in Sling), you can
> get the user id from the current session:
> To get the session, you can do two things:
> Session session = currentNode.getSession();
> Session session = resourceResolver.adaptTo(Session.class);
> See also http://cwiki.apache.org/SLING/scripting-variables.html >
> Alexander Klimetschek
> [hidden email] >