You are here

function _persistent_login_get_cookie_name in Persistent Login 7

Same name and namespace in other branches
  1. 6 persistent_login.module \_persistent_login_get_cookie_name()

Get the name of the Persistent Login cookie.

Include $base_path in PERSISTENT_LOGIN so a user can be logged in to more than one Drupal site per domain.

3 calls to _persistent_login_get_cookie_name()
persistent_login_user_logout in ./persistent_login.module
Implements hook_user_logout().
_persistent_login_check in ./persistent_login.module
Do the real work. Note that we may be in BOOTSTRAP_PAGE_CACHE mode with few modules loaded.
_persistent_login_create_cookie in ./persistent_login.module
Create a Persistent Login cookie.

File

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

Code

function _persistent_login_get_cookie_name() {
  static $cookie_name;
  if (!isset($cookie_name)) {

    // Derive the PL cookie name from the Drupal session name.
    // See conf_init() in Drupal includes/bootstrap.inc.
    $cookie_name = variable_get('persistent_login_cookie_prefix', 'PERSISTENT_LOGIN_') . substr(session_name(), 4);
  }
  return $cookie_name;
}