Revision history [back]

Get email of logged-in user in Horizon


In my extension I'm trying to access the email address of the logged-in user in a custom view.



does not have an 'email' attribute.

If I run

api.keystone.user_get(request,, admin=False)

I'll get a 404 and if I set admin=True it throws a "NotAuthorized" exception. The latter works if I'm log in as Admin user.

So, how can I get the email address of the user that is currently logged-in? I'm running Juno.