Check if a Member is Logged-in or Logged-out

Article author
Duncan Hamra
  • Updated

We recommend checking to see if the returns member info or is null. If it returns null, it means the current "member" does not have an account or is logged out.

window.$memberstackDom.getCurrentMember().then((member) => {
      if ( {
        console.log('there is a member', member);
        // do logged in logic here
      } else {
        console.log('no member', member);
         // do logged out logic here

Was this article helpful?



Please sign in to leave a comment.