public function TokenHandler::setNewSessionToken in Persistent Login 8
Create and store a new token for the specified user.
Parameters
int $uid: The user id to associate the token to.
File
- src/
EventSubscriber/ TokenHandler.php, line 205
Class
- TokenHandler
- Class TokenHandler.
Namespace
Drupal\persistent_login\EventSubscriberCode
public function setNewSessionToken($uid) {
try {
$this->token = $this->tokenManager
->createNewTokenForUser($uid);
} catch (TokenException $e) {
// Ignore error creating new token.
}
}