Provides an interface defining a user entity.
Expanded class hierarchy of UserInterface
All classes that implement UserInterface
interface UserInterface extends EntityInterface, AccountInterface {
/**
* Returns a list of roles.
*
* @return array
* List of role IDs.
*/
public function getRoles();
/**
* Whether a user has a certain role.
*
* @param string $rid
* The role ID to check.
*
* @return bool
* Returns TRUE if the user has the role, otherwise FALSE.
*/
public function hasRole($rid);
/**
* Add a role to a user.
*
* @param string $rid
* The role ID to add.
*/
public function addRole($rid);
/**
* Remove a role from a user.
*
* @param string $rid
* The role ID to remove.
*/
public function removeRole($rid);
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AccessibleInterface:: |
public | function | Checks data value access. | 5 |
AccountInterface:: |
public | function | Returns the secure session ID. | 3 |
AccountInterface:: |
public | function | Returns the session data. | 3 |
AccountInterface:: |
public | function | Returns the session ID. | 3 |
ComplexDataInterface:: |
public | function | Gets a property object. | 7 |
ComplexDataInterface:: |
public | function | Gets an array of property objects. | 7 |
ComplexDataInterface:: |
public | function | Gets the definition of a contained property. | 7 |
ComplexDataInterface:: |
public | function | Gets an array of property definitions of contained properties. | 7 |
ComplexDataInterface:: |
public | function | Gets an array of property values. | 7 |
ComplexDataInterface:: |
public | function | Determines whether the data structure is empty. | 7 |
ComplexDataInterface:: |
public | function | React to changes to a child property. | 7 |
ComplexDataInterface:: |
public | function | Sets a property value. | 7 |
ComplexDataInterface:: |
public | function | Sets multiple property values. | 7 |
EntityInterface:: |
public | function | Returns the bundle of the entity. | 3 |
EntityInterface:: |
public | function | Creates a duplicate of the entity. | 3 |
EntityInterface:: |
public | function | Deletes an entity permanently. | 3 |
EntityInterface:: |
public | function | Enforces an entity to be new. | 3 |
EntityInterface:: |
public | function | Returns the info of the type of the entity. | 3 |
EntityInterface:: |
public | function | Returns the type of the entity. | 3 |
EntityInterface:: |
public | function | Gets a backward compatibility decorator entity. | 3 |
EntityInterface:: |
public | function | Retrieves the exportable properties of the entity. | 3 |
EntityInterface:: |
public | function | Removes any possible (backward compatibility) decorator in use. | 3 |
EntityInterface:: |
public | function | Returns the revision identifier of the entity. | 3 |
EntityInterface:: |
public | function | Returns the entity identifier (the entity's machine name or numeric ID). | 3 |
EntityInterface:: |
public | function | Checks if this entity is the default revision. | 3 |
EntityInterface:: |
public | function | Returns whether the entity is new. | 3 |
EntityInterface:: |
public | function | Returns whether a new revision should be created on save. | 3 |
EntityInterface:: |
public | function | Returns the translation support status. | 3 |
EntityInterface:: |
public | function | Returns the label of the entity. | 3 |
EntityInterface:: |
public | function | Saves an entity permanently. | 3 |
EntityInterface:: |
public | function | Enforces an entity to be saved as a new revision. | 3 |
EntityInterface:: |
public | function | Returns the URI elements of the entity. | 3 |
EntityInterface:: |
public | function | Returns a list of URI relationships supported by this entity. | 3 |
EntityInterface:: |
public | function | Returns the entity UUID (Universally Unique Identifier). | 3 |
TranslatableInterface:: |
public | function | Gets a translation of the data. | 3 |
TranslatableInterface:: |
public | function | Returns the languages the data is translated to. | 3 |
TranslatableInterface:: |
public | function | Returns the default language. | 3 |
TypedDataInterface:: |
public | function | Gets a list of validation constraints. | 4 |
TypedDataInterface:: |
public | function | Gets the data definition. | 4 |
TypedDataInterface:: |
public | function | Returns the name of a property or item. | 4 |
TypedDataInterface:: |
public | function | Returns the parent data structure; i.e. either complex data or a list. | 4 |
TypedDataInterface:: |
public | function | Returns the property path of the data. | 4 |
TypedDataInterface:: |
public | function | Returns the root of the typed data tree. | 4 |
TypedDataInterface:: |
public | function | Returns a string representation of the data. | 4 |
TypedDataInterface:: |
public | function | Gets the data type. | 5 |
TypedDataInterface:: |
public | function | Gets the data value. | 4 |
TypedDataInterface:: |
public | function | Sets the context of a property or item via a context aware parent. | 4 |
TypedDataInterface:: |
public | function | Sets the data value. | 4 |
TypedDataInterface:: |
public | function | Validates the currently set data value. | 4 |
UserInterface:: |
public | function | Add a role to a user. | 2 |
UserInterface:: |
public | function |
Returns a list of roles. Overrides AccountInterface:: |
2 |
UserInterface:: |
public | function | Whether a user has a certain role. | 2 |
UserInterface:: |
public | function | Remove a role from a user. | 2 |