How to get input user Name and Email automatic in a new database without entering ?

Hi,
I want to input a coupon code in a database , But I want to know who is putting that coupon code so can give him the rewards. So how can I get the data of the member in my coupon database ? I need the Name of member and email ID .
Thank you !

Hi :raised_hand_with_fingers_splayed:

Read my tutorial here:
https://www.wix.com/corvid/forum/tips-tutorials-examples/tutorial-how-to-bypass-collection-permissions-and-hooks

This tutorial will guide you through getting the members private data.

In addition to the great tutorial provided by Ahmad, I would like to add that you can use the currentUser function that is explained here to get the user ID or email ID of the current user that is logged in.

After you get the the user ID, you can use the get() function from the wix-data API as explained here to get the information that you need to add to your coupon data collection.

Best regards,
Edward