This article is a simple way to redirect a user away from a certain page and towards another page if they are logged in. For example: some websites want to disable their homepage or pricing pages if users are already logged in.

Copy and paste the following code snippet into the page header.

  MemberStack.onReady.then(function(member) {
    if (member.loggedIn) {

This code snippet will only execute for members who ARE logged in. Keep in mind that it will affect ALL logged-in members.

Did this answer your question?