class AnonymousUserSession
Same name in other branches
- 9 core/lib/Drupal/Core/Session/AnonymousUserSession.php \Drupal\Core\Session\AnonymousUserSession
- 8.9.x core/lib/Drupal/Core/Session/AnonymousUserSession.php \Drupal\Core\Session\AnonymousUserSession
- 11.x core/lib/Drupal/Core/Session/AnonymousUserSession.php \Drupal\Core\Session\AnonymousUserSession
An account implementation representing an anonymous user.
Hierarchy
- class \Drupal\Core\Session\UserSession implements \Drupal\Core\Session\AccountInterface
- class \Drupal\Core\Session\AnonymousUserSession extends \Drupal\Core\Session\UserSession
Expanded class hierarchy of AnonymousUserSession
19 files declare their use of AnonymousUserSession
- ActiveLinkResponseFilterTest.php in core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ ActiveLinkResponseFilterTest.php - AnnounceBlockTest.php in core/
modules/ announcements_feed/ tests/ src/ FunctionalJavascript/ AnnounceBlockTest.php - AnonymousUserSessionTest.php in core/
tests/ Drupal/ Tests/ Core/ Session/ AnonymousUserSessionTest.php - CommentFieldAccessTest.php in core/
modules/ comment/ tests/ src/ Kernel/ CommentFieldAccessTest.php - CommentItem.php in core/
modules/ comment/ src/ Plugin/ Field/ FieldType/ CommentItem.php
File
-
core/
lib/ Drupal/ Core/ Session/ AnonymousUserSession.php, line 8
Namespace
Drupal\Core\SessionView 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
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
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 | ||
UserSession::$preferred_langcode | protected | property | ||
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 | ||
UserSession::getDisplayName | public | function | ||
UserSession::getEmail | public | function | ||
UserSession::getLastAccessedTime | public | function | ||
UserSession::getPreferredAdminLangcode | public | function | ||
UserSession::getPreferredLangcode | public | function | ||
UserSession::getRoles | public | function | ||
UserSession::getRoleStorage | protected | function | Returns the role storage object. | |
UserSession::getTimeZone | public | function | ||
UserSession::hasPermission | public | function | ||
UserSession::hasRole | public | function | Whether a user has a certain role. | |
UserSession::id | public | function | ||
UserSession::isAnonymous | public | function | ||
UserSession::isAuthenticated | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.