Hi
I am simply trying to idenify if a user is logged in or not:
import wixUsers from ‘wix-users’ ;
$w.onReady( () => {
if (wixUsers.currentUser.loggedIn) { // if the user is logged in
$w( “#text38” ).text = "User: " + wixUsers.currentUser.id;
}
else { // the user isn’t logged in
$w( “#text38” ).text = “Not logged in”
}
} );
this doesn’t seem to be working. Using the Wix permissions rule in the editor does work. Can this be done via code?
Thanks