UserSession::id

public UserSession::id()

Returns the user ID or 0 for anonymous.

Return value

int The user ID.

Overrides AccountInterface::id

File

core/lib/Drupal/Core/Session/UserSession.php, line 85

Class

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

Namespace

Drupal\Core\Session

Code

public function id() {
  return $this->uid;
}
doc_Drupal
2016-10-29 09:53:03
Comments
Leave a Comment

Please login to continue.