public function Request::hasPreviousSession

Whether the request contains a Session which was started in one of the previous requests.

@api

Return value

boolean

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php, line 552

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function hasPreviousSession() {

  // the check for $this->session avoids malicious users trying to fake a session cookie with proper name
  return $this
    ->hasSession() && $this->cookies
    ->has($this->session
    ->getName());
}