Getting current user with JavaScript

I had the requirement to get the current user (the one who clicked on a button) while using javascript. The script just needs the email address of the user that triggered the script, I didn’t find anything in the API Documentation so I started looking around in the browser web inspector and came across this:

base.utils.dtableStore.dtableSettings.contactEmail;

I does indeed give me the current user email and I’m happy with it but just wanted to ask if there is a different way since this isn’t documented and wouldn’t want it to break on some update.

Currently, there is no other way to get the email address of the user.
I think, you are good to go with this way to get the email address. I don’t see any reason why this should break.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.