Get the email address of a logged in user
Now you can retrieve the email address of a logged in user of your program. Here is the syntax:
We have created a new *database command that allows your program to interact with GuidedTrack’s database. For now, it can only be used to retrieve a user’s email address but in the future you will be able to create, update and delete records – just stay tuned!
Now, in order to protect the privacy of GuidedTrack users, they may need to grant permission to your program so that it can get their email address. When this happens, they will see a modal like this:
In the example shown, the program with the *database request has been named “University of Hobbiton” in Settings>Branding>Public Name, if you don’t create a public name for your program the modal will display your program’s name.
When will users see the modal?
Your logged-in users will only see the modal the first time they run the program, except if the program requires login and they created their GuidedTrack account when trying to run the program.
When will users not see the modal?
They will not see the modal if they already allowed your program to access your email address:
- Explicitly, by typing their email address when they were prompted to the first time that they run your program.
- Implicitly, by creating a GuidedTrack account when running your program for the first time.
What happens someone clicks on “Deny”?
If your user clicks on the “Deny” button of the modal, the *database request will throw an error where the reason is “email access denied by user” and the message, “The user denied access to their login email address.”
What happens if the user is not logged in?
In this case the *database request will also throw an error with the reason “user logged out” and message “The program cannot access the user’s email address because they are logged out.”
Remember, you can configure the login settings of your program in Settings>Login.
|