Redirect user to account page with native login

Hi! I tried to build a custom login but somehow it didn’t work on the mobile. So I decided to use the native login. But whenever the user logs in he stays on the same page. Is there any way to redirect the user to the members page after logging in from the native login screen?

Hello Joshi,

what you want to achieve, i think you can do this only with your owm customized Log-In-page. It is possible to change automaticaly the page after login, but teherefore you have to create a custom log-in.

How to do this, you can see here…
https://russian-dima.wixsite.com/meinewebsite/user-infos

When you have done your customized log-in page, then you will have the possibility to work with onReady or react by button-event-action.

function logIn (parameter) {
 var ERROR
 let email = $w('#input1').value
 let password = $w('#input2').value

    wixUsers.login(email, password)
    .then( () => {
        console.log("User is logged in");
 //  if (err != -19976 && err != -19988) {console.log("GO"), $w('#BOX2').hide(), $w('#BTN1').enable()}
 if (ERROR != -19976 && ERROR != -19988) {$w('#BOX1').hide(), check_LogStatus()}
    } )
    .catch( (err) => {
        ERROR = err
        console.log(err);
 if (err == -19976) {console.log("Wrong password !"), $w('#TXToutput4').text = "Wrong password !"}
 else if (err == -19988) {console.log("Unknown or wrong eMail !"), $w('#TXToutput4').text = "Unknown or wrong eMail !"}
 else {console.log("GO"), $w('#BOX1').hide(), $w('#BTN1').enable()}
    } );
}

function logOut (parameter) {wixUsers.logout(), check_LogStatus()}

export function BTNcode_click(event) {
 if ($w('#BOXcode').hidden==true) {$w('#BOXcode').show()}
 else {$w('#BOXcode').hide()}
}

export function BTNoriginal_click(event) {
 if ($w('#account').hidden==true) {$w('#account').show()}
 else {$w('#account').hide()}
}

When you take this example here, you could create an additional function and do it like this…

function page_jump (parameter) {
    wixLocation.to("https://www.google.com")
} 

Then you call this function in the right place to start the page-jump.

page_jump()

But all this is for desktop-version, i do not know how it will work in mobile-version (did not test it).