Hey Jason. I am also wondering how to tap into the Wix Members database and call data from there, if possible. I also don’t have the best coding skills. I have Wix Code team and Nayeli/Code Queen to thank for everything I’ve been able to build myself, which is WAY beyond my expectations. I don’t have the complete answer to your issue but this discussion may be of help.
You can have the page so that it is accessible to everyone and have it run a current user check, which will then redirect or display the appropriate data that is necessary.
STATIC PAGE
CODE TO CHECK IF USER HAS ACCESS TO A PAGE:
import checkAccess from ‘public/check-access’;
$w.onReady(() => {
return checkAcccurrentess();
});
CHECK THE USER/MEMBER ACCESS FILE:
import wixLocation from “wix-location”;
import wixData from “wix-data”;
import wixUsers from “wix-users”;
export default function checkAccess() {
if (!wixUsers.loggedIn) {
// no user is logged in
wixLocation.to(‘/’);
return new Promise(() => {});
}
return wixData.get(‘user-access’, wixUsers.currentUser.id)
.then(res => {
if (res && res.group === ‘a group with access’) {
// the user has access to the page
return Promise.resolve();
}
// the user does not have access to the page
wixLocation.to(‘/’);
return new Promise(() => {});
});
}
I think you can use this to tie in what you need. But I would also LOVE for someone to share how to call data from Wix Members, such as usernames, join dates, posts, post dates, follows, likes, shares, etc.
I thank anyone in advance for contributing.
I hope this helps Jason.
Nelson