You are here

function _persistent_login_get_cookie_name in Persistent Login 6

Same name and namespace in other branches
  1. 7 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 in ./persistent_login.module
Implementation of hook_user().
_persistent_login_check in ./persistent_login.module
_persistent_login_check(). 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 476
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;
}