You are here

class AnonymousUserSession in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Session/AnonymousUserSession.php \Drupal\Core\Session\AnonymousUserSession

An account implementation representing an anonymous user.

Hierarchy

Expanded class hierarchy of AnonymousUserSession

14 files declare their use of AnonymousUserSession
AnonymousUserSessionTest.php in core/tests/Drupal/Tests/Core/Session/AnonymousUserSessionTest.php
Contains \Drupal\Tests\Core\Session\AnonymousUserSessionTest.
BrowserTestBase.php in core/modules/simpletest/src/BrowserTestBase.php
Contains \Drupal\simpletest\BrowserTestBase.
CommentFieldAccessTest.php in core/modules/comment/src/Tests/CommentFieldAccessTest.php
Contains \Drupal\comment\Tests\CommentFieldAccessTest.
CommentFieldNameTest.php in core/modules/comment/src/Tests/Views/CommentFieldNameTest.php
Contains \Drupal\comment\Tests\Views\CommentFieldNameTest.
CommentItem.php in core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php
Contains \Drupal\comment\Plugin\Field\FieldType\CommentItem.

... See full list

File

core/lib/Drupal/Core/Session/AnonymousUserSession.php, line 13
Contains \Drupal\Core\Session\AnonymousUserSession.

Namespace

Drupal\Core\Session
View source
class AnonymousUserSession extends UserSession {

  /**
   * Constructs a new anonymous user session.
   *
   * Intentionally don't allow parameters to be passed in like UserSession.
   */
  public function __construct() {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AccountInterface::ANONYMOUS_ROLE constant Role ID for anonymous users.
AccountInterface::AUTHENTICATED_ROLE constant Role ID for authenticated users.
AnonymousUserSession::__construct public function Constructs a new anonymous user session. Overrides UserSession::__construct
UserSession::$access protected property The Unix timestamp when the user last accessed the site.
UserSession::$mail protected property The email address of this account.
UserSession::$name public property The name of this account.
UserSession::$preferred_admin_langcode protected property The preferred administrative language code of the account.
UserSession::$preferred_langcode protected property The preferred language code of the account.
UserSession::$roles protected property List of the roles this user has.
UserSession::$timezone protected property The timezone of this account.
UserSession::$uid protected property User ID.
UserSession::getAccountName public function Returns the unaltered login name of this account. Overrides AccountInterface::getAccountName
UserSession::getDisplayName public function Returns the display name of this account. Overrides AccountInterface::getDisplayName
UserSession::getEmail public function Returns the email address of this account. Overrides AccountInterface::getEmail
UserSession::getLastAccessedTime public function The timestamp when the account last accessed the site. Overrides AccountInterface::getLastAccessedTime
UserSession::getPreferredAdminLangcode function Returns the preferred administrative language code of the account. Overrides AccountInterface::getPreferredAdminLangcode
UserSession::getPreferredLangcode function Returns the preferred language code of the account. Overrides AccountInterface::getPreferredLangcode
UserSession::getRoles public function Returns a list of roles. Overrides AccountInterface::getRoles
UserSession::getRoleStorage protected function Returns the role storage object.
UserSession::getTimeZone public function Returns the timezone of this account. Overrides AccountInterface::getTimeZone
UserSession::getUsername public function Returns the unaltered login name of this account. Overrides AccountInterface::getUsername
UserSession::hasPermission public function Checks whether a user has a certain permission. Overrides AccountInterface::hasPermission
UserSession::id public function Returns the user ID or 0 for anonymous. Overrides AccountInterface::id
UserSession::isAnonymous public function Returns TRUE if the account is anonymous. Overrides AccountInterface::isAnonymous
UserSession::isAuthenticated public function Returns TRUE if the account is authenticated. Overrides AccountInterface::isAuthenticated