You are here

public function AccountInterface::id in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/Session/AccountInterface.php \Drupal\Core\Session\AccountInterface::id()

Returns the user ID or 0 for anonymous.

Return value

int The user ID.

1 method overrides AccountInterface::id()
Account::id in src/Session/Account.php
Returns the user ID or 0 for anonymous.

File

lib/Drupal/Core/Session/AccountInterface.php, line 36
Contains \Drupal\Core\Session\AccountInterface.

Class

AccountInterface
Defines an account interface which represents the current user.

Namespace

Drupal\Core\Session

Code

public function id();