Get email of logged-in user in Horizon

asked 2015-07-06 04:25:50 -0500

Hi

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

Unfortunately

request.user

does not have an 'email' attribute.

If I run

api.keystone.user_get(request, request.user.id, 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.

Thanks

edit retag flag offensive close merge delete