PrivateTempStore::getOwner

protected PrivateTempStore::getOwner()

Gets the current owner based on the current user or the session ID.

Return value

string The owner.

File

core/modules/user/src/PrivateTempStore.php, line 203

Class

PrivateTempStore
Stores and retrieves temporary data for a given owner.

Namespace

Drupal\user

Code

1
2
3
protected function getOwner() {
  return $this->currentUser->id() ? : $this->requestStack->getCurrentRequest()->getSession()->getId();
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.