interface AccountInterface

Defines an account interface which represents the current user.

Defines an object that has a user id, roles and can have session data. The interface is implemented both by the global session and the user entity.

Hierarchy

Expanded class hierarchy of AccountInterface

All classes that implement AccountInterface

30 files declare their use of AccountInterface

File

drupal/core/lib/Drupal/Core/Session/AccountInterface.php, line 16
Contains \Drupal\Core\Session\AccountInterface.

Namespace

Drupal\Core\Session
View source

Members

Namesort descending Modifiers Type Description Overrides
AccountInterface::getRoles public function Returns a list of roles. 2
AccountInterface::getSecureSessionId public function Returns the secure session ID. 3
AccountInterface::getSessionData public function Returns the session data. 3
AccountInterface::getSessionId public function Returns the session ID. 3
AccountInterface::id public function Returns the user ID or 0 for anonymous. 1