function _persistent_login_setcookie in Persistent Login 7
Same name and namespace in other branches
- 5 persistent_login.module \_persistent_login_setcookie()
- 6 persistent_login.module \_persistent_login_setcookie()
Set a cookie with the same options as the session cookie.
Parameters
$name: The name of the cookie.
$value: The value to store in the cookie.
$expire: The time the cookie expires. This is a Unix timestamp so is in number of seconds since the epoch. By default expires when the browser is closed.
2 calls to _persistent_login_setcookie()
- persistent_login_user_logout in ./
persistent_login.module - Implements hook_user_logout().
- _persistent_login_create_cookie in ./
persistent_login.module - Create a Persistent Login cookie.
File
- ./
persistent_login.module, line 533 - Provide a "Remember Me" checkbox in the login form.
Code
function _persistent_login_setcookie($name, $value, $expire = 0) {
$params = session_get_cookie_params();
setcookie($name, $value, $expire, $params['path'], $params['domain'], $params['secure'], $params['httponly']);
}