public function 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\SessionCode
public function id() { return $this->uid; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Session!UserSession.php/function/UserSession::id/8.1.x