public function TokenHandler::getTokenFromCookie in Persistent Login 8
Create a token object from the cookie provided in the request.
Parameters
\Symfony\Component\HttpFoundation\Request $request: A request that contains a persistent login cookie.
Return value
\Drupal\persistent_login\PersistentToken A new PersistentToken object.
1 call to TokenHandler::getTokenFromCookie()
- TokenHandler::loadTokenOnRequestEvent in src/
EventSubscriber/ TokenHandler.php - Load a token on this request, if a persistent cookie is provided.
File
- src/
EventSubscriber/ TokenHandler.php, line 195
Class
- TokenHandler
- Class TokenHandler.
Namespace
Drupal\persistent_login\EventSubscriberCode
public function getTokenFromCookie(Request $request) {
return PersistentToken::createFromString($this->cookieHelper
->getCookieValue($request));
}