Hi everyone!
I am experimenting with my setup and I noticed that a logged in user can see the /login and /signup pages. Is it possible to redirect them to their user-specific dashboard if they are already logged in?
Thanks!
Hi everyone!
I am experimenting with my setup and I noticed that a logged in user can see the /login and /signup pages. Is it possible to redirect them to their user-specific dashboard if they are already logged in?
Thanks!
For /login, I noticed that it redirects successfully when I click a βLoginβ link. But not if I type /login in the browser.
Looks like placing the following code by @Josh-Lopez in both /login and /signup pages worked here too:
<script>
MemberStack.onReady.then(function(member) {
if (member.loggedIn) {
var memberId = member.id;
window.location.replace("/investors-id/" + memberId);
}
})
</script>
Awesome! Thanks for sharing
Sorry! Code noob here. Where should I place this code ? In the head or body ?
Thank you!
Nevermind. I figured it out with some trial and error. If someone is looking for it in the future, use this and place it in the body tag of the page
<script>
MemberStack.onReady.then(function(member) {
if (member.loggedIn) {
var memberId = member.id;
window.location.replace('URL of the page you want the user to be redirected to goes here');
}
})
</script>