Defines the user entity class.
@Plugin(
id = "user",
label = @Translation("User"),
module = "user",
controller_class = "Drupal\user\UserStorageController",
render_controller_class = "Drupal\user\UserRenderController",
form_controller_class = {
"profile" = "Drupal\user\ProfileFormController",
"register" = "Drupal\user\RegisterFormController"
},
default_operation = "profile",
translation_controller_class = "Drupal\user\ProfileTranslationController",
base_table = "users",
uri_callback = "user_uri",
label_callback = "user_label",
fieldable = TRUE,
entity_keys = {
"id" = "uid",
"uuid" = "uuid"
},
bundles = {
"user" = {
"label" = "User",
"admin" = {
"path" = "admin/config/people/accounts",
"access arguments" = {"administer users"}
}
}
},
view_modes = {
"full" = {
"label" = "User account",
"custom_settings" = FALSE
},
"compact" = {
"label" = "Compact",
"custom_settings" = TRUE
}
}
)
Expanded class hierarchy of User
class User extends Entity {
/**
* The user ID.
*
* @var integer
*/
public $uid;
/**
* The user UUID.
*
* @var string
*/
public $uuid;
/**
* The unique user name.
*
* @var string
*/
public $name = '';
/**
* The user's password (hashed).
*
* @var string
*/
public $pass;
/**
* The user's email address.
*
* @var string
*/
public $mail = '';
/**
* The user's default theme.
*
* @var string
*/
public $theme;
/**
* The user's signature.
*
* @var string
*/
public $signature;
/**
* The user's signature format.
*
* @var string
*/
public $signature_format;
/**
* The timestamp when the user was created.
*
* @var integer
*/
public $created;
/**
* The timestamp when the user last accessed the site. A value of 0 means the
* user has never accessed the site.
*
* @var integer
*/
public $access = 0;
/**
* The timestamp when the user last logged in. A value of 0 means the user has
* never logged in.
*
* @var integer
*/
public $login = 0;
/**
* Whether the user is active (1) or blocked (0).
*
* @var integer
*/
public $status = 1;
/**
* The user's timezone.
*
* @var string
*/
public $timezone;
/**
* The user's langcode.
*
* @var string
*/
public $langcode = LANGUAGE_NOT_SPECIFIED;
/**
* The user's preferred langcode for receiving emails and viewing the site.
*
* @var string
*/
public $preferred_langcode = LANGUAGE_NOT_SPECIFIED;
/**
* The user's preferred langcode for viewing administration pages.
*
* @var string
*/
public $preferred_admin_langcode = LANGUAGE_NOT_SPECIFIED;
/**
* The email address used for initial account creation.
*
* @var string
*/
public $init = '';
/**
* The user's roles.
*
* @var array
*/
public $roles = array();
/**
* Implements Drupal\Core\Entity\EntityInterface::id().
*/
public function id() {
return $this->uid;
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Entity:: |
protected | property | Boolean indicating whether the entity should be forced to be new. | |
Entity:: |
protected | property | The entity type. | |
Entity:: |
protected | property | Indicates whether this is the default revision. | 1 |
Entity:: |
protected | property | Boolean indicating whether a new revision should be created on save. | |
Entity:: |
public | function |
Implements AccessibleInterface::access(). Overrides AccessibleInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::bundle(). Overrides EntityInterface:: |
4 |
Entity:: |
public | function |
Implements EntityInterface::createDuplicate(). Overrides EntityInterface:: |
3 |
Entity:: |
public | function |
Implements EntityInterface::delete(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::enforceIsNew(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::entityInfo(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::entityType(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::get(). Overrides ComplexDataInterface:: |
2 |
Entity:: |
public | function | Implements ComplexDataInterface::getIterator(). | 1 |
Entity:: |
public | function |
Implements ComplexDataInterface::getProperties(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements ComplexDataInterface::getPropertyDefinition(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements ComplexDataInterface::getPropertyDefinitions(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements ComplexDataInterface::getPropertyValues(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements Drupal\Core\Entity\EntityInterface::getRevisionId(). Overrides EntityInterface:: |
3 |
Entity:: |
public | function |
Implements TranslatableInterface::getTranslation(). Overrides TranslatableInterface:: |
1 |
Entity:: |
public | function |
Implements TranslatableInterface::getTranslationLanguages(). Overrides TranslatableInterface:: |
1 |
Entity:: |
public | function |
Implements Drupal\Core\Entity\EntityInterface::isDefaultRevision(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Implements ComplexDataInterface::isEmpty(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements EntityInterface::isNew(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Implements EntityInterface::isNewRevision(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::label(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Implements TranslatableInterface::language(). Overrides TranslatableInterface:: |
1 |
Entity:: |
public | function |
Implements EntityInterface::save(). Overrides EntityInterface:: |
3 |
Entity:: |
public | function |
Implements ComplexDataInterface::set(). Overrides ComplexDataInterface:: |
2 |
Entity:: |
public | function |
Implements EntityInterface::setNewRevision(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements ComplexDataInterface::setPropertyValues(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function | Returns the languages the entity is translated to. | |
Entity:: |
public | function |
Implements EntityInterface::uri(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Implements EntityInterface::uuid(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function | Constructs an Entity object. | 2 |
User:: |
public | property | The timestamp when the user last accessed the site. A value of 0 means the user has never accessed the site. | |
User:: |
public | property | The timestamp when the user was created. | |
User:: |
public | property | The email address used for initial account creation. | |
User:: |
public | property |
The user's langcode. Overrides Entity:: |
|
User:: |
public | property | The timestamp when the user last logged in. A value of 0 means the user has never logged in. | |
User:: |
public | property | The user's email address. | |
User:: |
public | property | The unique user name. | |
User:: |
public | property | The user's password (hashed). | |
User:: |
public | property | The user's preferred langcode for viewing administration pages. | |
User:: |
public | property | The user's preferred langcode for receiving emails and viewing the site. | |
User:: |
public | property | The user's roles. | |
User:: |
public | property | The user's signature. | |
User:: |
public | property | The user's signature format. | |
User:: |
public | property | Whether the user is active (1) or blocked (0). | |
User:: |
public | property | The user's default theme. | |
User:: |
public | property | The user's timezone. | |
User:: |
public | property | The user ID. | |
User:: |
public | property | The user UUID. | |
User:: |
public | function |
Implements Drupal\Core\Entity\EntityInterface::id(). Overrides Entity:: |