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

Skip to first unread message

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

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 ${}"

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
0 new messages