Login mail in a database

hi everyone

I would insert the “login email” member in a database for understanding who is loaded some pictures.
I would connect 2 database.
I searched everywhere but i did not find a tutorial.

thank you for you time

I noticed the ID in member database is the same of the owner in other database that i made

help :frowning:

Just use the ID field in the database, it will be hidden by default, however it will be unique to that site member,
https://support.wix.com/en/article/about-your-database-collection-fields#system-fields

So if you want to get anything in a dataset by that specific user, you just simply use Wix Users API and current user to get the users Id and show only their data.
https://www.wix.com/corvid/reference/wix-users.html
https://www.wix.com/corvid/reference/wix-users.html#currentUser
https://www.wix.com/corvid/reference/wix-users.User.html#id

You can do this without code as shown here.
https://support.wix.com/en/article/filtering-database-content-displayed-on-your-page

You can see a basic example from the Wix Users API to get the users last name from the Members/PrivateMembers Data collection which is automatically added to your site when you add the Wix Members app.

How can I get the current user’s name?
Use the currentUser property to get the current user’s id. Then query the Members/PrivateMembersData collection for the item with that _id.

wixData.query("Members/PrivateMembersData") \
  .eq("_id", wixUsers.currentUser.id) \
  .find() \
  .then( (results) => { \
    lastName = results.items[0].lastName; \
  } );

thank you for your answer.
I wanted only add a field in a database for undestanding which member had loaded an image…
I know the ID member and the owner in a database are the same but I would the mail or the name of the user
I think it is an hard work for my competences.