You are here

public function InstapageCmsPluginDrupal7Connector::isLoginPage in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/connectors/InstapageCmsPluginDrupal7Connector.php \InstapageCmsPluginDrupal7Connector::isLoginPage()

Checks if current URL is login page.

Return value

bool True if current URL is login page.

1 call to InstapageCmsPluginDrupal7Connector::isLoginPage()
InstapageCmsPluginDrupal7Connector::isHtmlReplaceNecessary in core/connectors/InstapageCmsPluginDrupal7Connector.php
Checks if there is a need to replace content of CMS with a landing page. Prevents content replacement on admin/login pages.

File

core/connectors/InstapageCmsPluginDrupal7Connector.php, line 597

Class

InstapageCmsPluginDrupal7Connector
Class that utilizes native Drupal 7 functions to perform actions like remote requests and DB operations.

Code

public function isLoginPage() {
  $requestUrl = $_SERVER['REQUEST_URI'];
  if (strpos($requestUrl, '/user') === 0 || $_GET['q'] == 'user') {
    return true;
  }
  return false;
}