- On the signup form, use wixLocation to redirect the members to the page that you use to collect the new data on.
// A theoretical function on a web module
import { signup } from 'backend/signup.jsw';
import { applySessionToken } from 'wix-users';
import wixLocation from 'wix-location';
let email; // User email
let password; // User password
signup(email, password).then((token) => {
// Log the user in after they signup
applySessionToken(token).then(() => {
// Redirect the user to your page to fill up additional data
wixLocation.to('/finish-data');
})
})
- On the masterPage.js file, make sure to check whether the user filled the required fields or not.
/* A theoretical function on a web module that checks whether the user finished their data or not */
import { checkAccount } from 'backend/account.jsw';
import wixLocation from 'wix-location';
$w.onReady(() => {
checkAccount().then((result) => {
// If the account is ready (all data has been filled).
if (result.account === 'ready') {
// Redirect them to a special page to welcome them
wixLocation.to('/welcome-members');
} else {
// Prompt the user to fill in their data.
wixLocation.to('/finish-data');
}
})
})
Hope this helps~!
Ahmad