AccountProxy::id

public AccountProxy::id()

Returns the user ID or 0 for anonymous.

Return value

int The user ID.

Overrides AccountInterface::id

File

core/lib/Drupal/Core/Session/AccountProxy.php, line 67

Class

AccountProxy
A proxied implementation of AccountInterface.

Namespace

Drupal\Core\Session

Code

1
2
3
public function id() {
  return $this->getAccount()->id();
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.