I need a way to identify users. I have a Google site that is users access via their gmail accounts. My site is designed to allow users to view any data, but edit only their own data. This works fine for me as I'm the owner of the site and publisher of the scripts, but Session.getActiveUser().getUserLoginId()
returns null
for anyone else.
Please provide me the solution about this problem. Any link / any peace of code?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I suppose, that the script is deployed with the Execute the app as:
combobox set to me
. Please check it and change the combobox value to User accessing the web app
.