You are here

function _persistent_login_match in Persistent Login 7

Same name and namespace in other branches
  1. 5 persistent_login.module \_persistent_login_match()
  2. 6 persistent_login.module \_persistent_login_match()

Check the page passsed and see if it should be secure or insecure.

Parameters

$path: The path of the page to check.

Return value

FALSE - Page should be insecure. TRUE - Page should be secure.

1 call to _persistent_login_match()
persistent_login_init in ./persistent_login.module
Implements hook_init(). Before the menu system takes control, perform a Persistent Login if appropriate.

File

./persistent_login.module, line 564
Provide a "Remember Me" checkbox in the login form.

Code

function _persistent_login_match($path) {
  $secure = (bool) variable_get('persistent_login_secure', 1);
  $pages = trim(variable_get('persistent_login_pages', PERSISTENT_LOGIN_SECURE_PATHS));
  if ($pages) {
    return !($secure xor drupal_match_path($path, $pages));
  }
  else {
    return FALSE;
  }
}