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 piece of code?
how to indentify user using google apps script?
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
.
yes, checked 'Execute app as :' (for gmail domain) and combo-box is set like you told but still the same problem there. –
Specialty
@ViralShah, I wrote about two values
me
and User accessing the web app
. Which value do you have? –
Priapitis having writes of my deployed app to
User accessing the web app.
still problem remaining.. –
Specialty @ViralShah. I created a simple script which works correctly. The deployed script is here. The source is here. The deploy option
Execute the app as
is User accessing the web app
. The Active User
label contains correct email for different accounts. Can u create similar script which does not work and publish it in similar way as I did? –
Priapitis © 2022 - 2024 — McMap. All rights reserved.