Is there a way to get username using Liquid?


(Krishna Potluri) #1

Here is my data action:

Instead of asking the user to enter his username, is there a way to get logged-in account’s username?

(Morgan Imel) #2

Hi @krishpotluri,

Could you clarify what you mean by username? In Looker, users either log in with their email address, or with an external authentication system (SAML, LDAP, etc). Or are you looking for the user’s full name?

It’s possible to use liquid to reference user attributes. In the documentation here you can see what that looks like: _user_attributes['name_of_attribute']. Email and full name are system user attributes so you can refer to those without creating new attributes.

Let me know if you have any questions!