I have a page that is only working at my admin account. I tested the page on another account (my websites uses a member system) and the elements were not showing the right way. Please help.
This is some of my code of the page.
user.getEmail()
.then( (email) => {
let userEmail = email;
wixData.query("TempOrders")
.eq("eMail", userEmail) .find() .then( (results) => {
firstItem = results.items[0];
if(results.length === 0){
$w("#project1").hide();
$w("#noProjectBox").show();
}
So keep in mind this is just part of my code and this works at my admin account.
So it checks if there are projects on an account based on email. On my admin account, the project1 box hides and noProjectBox shows, because I have no projects. But on my other account (with another email) the project1 box shows and the noProjectBox hides (as set as default), but I have also no projects on this account. What do I have to change?
Thanks in advance!