public function Account::id in Service Container 7.2
Same name and namespace in other branches
- 7 src/Session/Account.php \Drupal\service_container\Session\Account::id()
Returns the user ID or 0 for anonymous.
Return value
int The user ID.
Overrides AccountInterface::id
File
- src/
Session/ Account.php, line 51 - Contains \Drupal\service_container\Session\Account.
Class
- Account
- Wraps the global user to provide the account interface.
Namespace
Drupal\service_container\SessionCode
public function id() {
return $GLOBALS['user']->uid;
}