Login Links

When you need to login to LiveWhale, visiting /livewhale/ or /livewhale/?login on your website or calendar is the quickest way to login.

There are a few other ways to setup login links that might be useful when theming your site.

Login URL Where you’re sent after logging in
/livewhale/ The back-end / dashboard interface
/livewhale/?login The back-end / dashboard interface
/livewhale/?login&referer=1 The page you were on when you clicked the link
/livewhale/?login&url=/my-page/ The URL specified (in this example, /my-page/ )

You can also link to /livewhale/?logout to log out of LiveWhale.

Examples

On the front-end of your designs, you may want to put an Editor Login link in the footer. This one, using &referer=1, will take the user back to the current page after logging in.

<a href="/livewhale/?login&referer=1" class="btn">Editor login</a>

Or, if you’ve got a calendar or page that shows different content for logged-in users (e.g., events set to the “Any logged-in user” privacy settings), you might want to specify a return URL:

<a href="/livewhale/?login&url=/directory/" class="btn">Log in to view full directory</a>

Advanced Example

Note: Implementing this requires a familiarity with LiveWhale module development. We’re happy to help—feel free to reach out for support if you’d like our help with a custom solution like this.

If you want to show different things to logged-in and logged out users, you might prefer to use a custom module to set an XPHP variable indicating if the page visitor is logged in.

public function onLoad() { // on application load
  global $_LW;
  if ($_LW->isLiveWhaleUser() || $_LW->isSSOAuthOnlyUser()) { // if an editor or SSO-only user is logged in
      $GLOBALS['user_is_logged_in']=1; // set XPHP variable to use in template
  }
}

Then, in your template or theme files, you could do something like:

<xphp content="true">
  <if var="user_is_logged_in"/>
  <content>
    <p><a href="/livewhale/?logout">Log out</a></p>
  </content>
  <else content="true">
  <content>
      <p><a href="/livewhale/?login&referer=1">Log in for more information</a></p>
  </content>
  </else>
</xphp>

On this page