[SOLVED] Get current users email, username and custom fields (columns)

I don’t see any of this in the documentation but I’m trying to query the current user’s email, username and other columns from “_User”

When I check the attributes for the user I don’t see email or the other fields I’m looking for:

const role = await Moralis.User.current().attributes;
console.log('ROLE', role);

Screen Shot 2022-07-05 at 12.18.10 PM

Nevermind, the current user cached in localStorage was the wrong account.

This works.

1 Like