I don't remember who blessed me with their wisdom, but this is a code I place on any page (like the landing page) where I want to redirect members to their dashboards instead. Place in <head>.

<script>
MemberStack.onReady.then(function(member) {   
  if (member.loggedIn) {
     var memberId = member.id;
     window.location.replace("/change-to-collection-url/" + memberId);
  }
})
</script>
To change the redirect to go to member page, replace memberId with member.memberPage
Place in <head> but after the Memberstack.js script. 😃

Post a comment

Log in