In the code above, I’m trying (just a test), after login, redirect the user to an url that contains his email.
This page is published in https://www.accumaker.com/apphome.
The code was not indicated as error by wixeditor, but the redirection is not happening.
Someone can help me please?
Thanks in advance!
import wixUsers from ‘wix-users’;
let user = wixUsers.currentUser;
let userId = user.id; // “r5cme-6fem-485j-djre-4844c49”
let isLoggedIn = user.loggedIn; // true
user.getEmail()
.then( (email) => {
let userEmail = email; // “user@something.com”
} );
import wixLocation from ‘wix-location’;
$w.onReady(() => {
var parametrounico = wixLocation.url.split(“?”);
var urlpadrao =
“https://creator.zohopublic.com/accumakerapp/accumaker-anamnese/page-embed/Home_Postagem/Cvr4TEy2mwa4n0396SFjXEpB8H6bytAAYA43RYMggmXvHUPDSJ7nTKBxk1v8HFPrD107Fa81eH75jS6Zfy4h4782SPrgpm7h68r1”;
wixLocation.to(urlpadrao + “?” + this .userEmail);
});