LLMS_Session::set_cookie()
Set the cookie
Return Return
(boolean)
Source Source
File: includes/class.llms.session.php
protected function set_cookie() {
$hash_str = sprintf( '%1$s|%2$s', $this->get_id(), $this->expires );
$hash = hash_hmac( 'md5', $hash_str, wp_hash( $hash_str ) );
$value = sprintf( '%1$s||%2$d||%3$d||%4$s', $this->get_id(), $this->expires, $this->expiring, $hash );
// There's no cookie set or the existing cookie needs to be updated.
if ( ! isset( $_COOKIE[ $this->cookie ] ) || $_COOKIE[ $this->cookie ] !== $value ) {
return llms_setcookie( $this->cookie, $value, $this->expires, COOKIEPATH ? COOKIEPATH : '/', COOKIE_DOMAIN, $this->use_secure_cookie(), true );
}
return false;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.0.0 | Introduced. |