How to get the email address for a user in a GSP

3 views
Skip to first unread message

mart...@googlemail.com

unread,
Dec 17, 2010, 6:35:03 AM12/17/10
to Nimble
Hi,

I am trying out nimble for a webapp and am so far very impressed. I am
using only OpenID for my app, so my User domain objects do not get
populated with a "real name", but generally do get populated with an
email address (when using e.g. Google as an OpenID provider).
Therefore when I display the logged in user I want to use the email
field rather than the name. The tag

<n:principalName />

gives me the real name, which is empty. I'd like to do something like

"logged in as ${user.email}"

but I don't want to have to include the logged-in user as part of the
model for every single controller rendering. Is the current user
automatically injected into the model by nimble? and if so what is it
called? Alternatively I suppose I could write my own taglib, but I
wanted to check if this function was already implemented.
Reply all
Reply to author
Forward
0 new messages