You are here

public function UserSession::id in Zircon Profile 8

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

Returns the user ID or 0 for anonymous.

Return value

int The user ID.

Overrides AccountInterface::id

1 call to UserSession::id()
UserSession::hasPermission in core/lib/Drupal/Core/Session/UserSession.php
Checks whether a user has a certain permission.

File

core/lib/Drupal/Core/Session/UserSession.php, line 90
Contains \Drupal\Core\Session\UserSession.

Class

UserSession
An implementation of the user account interface for the global user.

Namespace

Drupal\Core\Session

Code

public function id() {
  return $this->uid;
}