How to specify a user using Google Apps script?

I need a way to identify users. I have a Google site accessed through their gmail accounts. My site is designed to allow users to view any data, but only edit their own data. This works great for me, as I am the owner of the site and the publisher of scripts, but Session.getActiveUser().getUserLoginId()returns nullfor anyone else.
Please provide me a solution to this problem. Any link / any world of code?

+1
source share
1 answer

I assume the script is deployed with the set Execute the app as:set to me. Check it and change the value of the combo box to User accessing the web app.

+3
source

All Articles