If you are talking about @code-queen tutorial from here.
2017 Create Member Profile Log In Page - Custom Private Client Member Dashboard - Wix Code
Of which she updated and republished here.
Creating a client dashboard in Wix using Wix Code
https://codequeen.wixsite.com/membership-dashboard
Then note that this is her take and great thorough explanation on how to get this Wix tutorial to work for you on your own site.
https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area
However, with your wish of changing from user id to user email, then note that will only work if each site member on your website has their own unique email address and you don’t have site members from the same place for example using the same email address and just simply changing their password only.
This is one reason why using the user id is a better option here as each user id, like the owner id, is unique to each and every specific site member, so you will never have duplicate id values whereas you can easily have duplicate email addresses.
Also, as shown in the pics below, you can’t have dynamic pages which have the same page url, so again having duplicate email addresses will cause you issues as you will identical dynamic pages which won’t work.
Plus, as you are using your own created Members dataset for this, then login email is not available for you as you won’t have it in your Members dataset, you have instead the email field as stated in the Wix tutorial.
Also, if you are wanting to change the Members Profile page and the Members Update Profile page to display email and not id, then you will need to change it in both of the pages settings too.
You will need to click on where it says ID and change it to the field from your dataset that you want, in your case email and which is stated again in the Wix tutorial
Note also in the Wix tutorial that you can’t have the same dynamic page url more than once, each one has to be unique, then that is another reason why you can’t use email and need to be using the id field instead.
As for the Wix Location to link to your page, then as shown in the tutorial, if you stick with the user id then it should be like this.
export function profileButton_click(event) {
wixLocation.to(`/Members/${wixUsers.currentUser.id}`);
}
So to use email you will have to change the .id part of this to .email to suit your page setup
export function profileButton_click(event) {
wixLocation.to(`/Members/${wixUsers.currentUser.email}`);
}
Although, as the tutorial states, you would be much better off sticking with using the id field for each site member.