Custom user redirects

Hey @deciseelectricandcontrol,

I’m not sure about redirecting a user to a page based on their username, but you could do it based on their email, have a look at this:

$w('#loginNow').onClick(function(){ 
    let email = $w('#loginEmail').value; 
    let password = $w('#loginPassword').value;
wixUsers.login(email,password)
    .then(()=>{
wixLocation.to(`/${email}`
});
    });
    });

You could use their username if you have it saved in a database, otherwise I don’t think there is a way.

Please try out this code and let me know if you need help!