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; }
Please login to continue.