UserInterface::addRole

public UserInterface::addRole($rid) Add a role to a user. Parameters string $rid: The role ID to add. File core/modules/user/src/UserInterface.php, line 33 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function addRole($rid);

UserInterface::activate

public UserInterface::activate() Activates the user. Return value \Drupal\user\UserInterface The called user entity. File core/modules/user/src/UserInterface.php, line 144 Class UserInterface Provides an interface defining a user entity. Namespace Drupal\user Code public function activate();

UserInterface

Provides an interface defining a user entity. Hierarchy interface \Drupal\Core\Entity\ContentEntityInterface extends \Traversable; interface \Drupal\Core\Entity\EntityChangedInterface; interface \Drupal\Core\Session\AccountInterfaceinterface \Drupal\user\UserInterface Related topics User accounts, permissions, and roles API for user accounts, access checking, roles, and permissions. File core/modules/user/src/UserInterface.php, line 14 Namespace Drupal\user Members Name Modifiers

UserDataInterface::set

public UserDataInterface::set($module, $uid, $name, $value) Stores data for a user account. Parameters string $module: The name of the module the data is associated with. int $uid: The user account ID the data is associated with. string $name: The name of the data key. mixed $value: The value to store. Non-scalar values are serialized automatically. File core/modules/user/src/UserDataInterface.php, line 46 Class UserDataInterface Defines the user data service interface. Namespace Drupa

UserDataInterface::get

public UserDataInterface::get($module, $uid = NULL, $name = NULL) Returns data stored for a user account. Parameters string $module: The name of the module the data is associated with. int $uid: (optional) The user account ID the data is associated with. string $name: (optional) The name of the data key. Return value mixed|array The requested user account data, depending on the arguments passed: For $module, $name, and $uid, the stored value is returned, or NULL if no value was found. For $mo

UserDataInterface::delete

public UserDataInterface::delete($module = NULL, $uid = NULL, $name = NULL) Deletes data stored for a user account. Parameters string|array $module: (optional) The name of the module the data is associated with. Can also be an array to delete the data of multiple modules. int|array $uid: (optional) The user account ID the data is associated with. If omitted, all data for $module is deleted. Can also be an array of IDs to delete the data of multiple user accounts. string $name: (optional) The n

UserDataInterface

Defines the user data service interface. Hierarchy interface \Drupal\user\UserDataInterface File core/modules/user/src/UserDataInterface.php, line 8 Namespace Drupal\user Members Name Modifiers Type Description UserDataInterface::delete public function Deletes data stored for a user account. UserDataInterface::get public function Returns data stored for a user account. UserDataInterface::set public function Stores data for a user account.

UserData::__construct

public UserData::__construct(Connection $connection) Constructs a new user data service. Parameters \Drupal\Core\Database\Connection $connection: The database connection to use. File core/modules/user/src/UserData.php, line 25 Class UserData Defines the user data service. Namespace Drupal\user Code public function __construct(Connection $connection) { $this->connection = $connection; }

UserData::set

public UserData::set($module, $uid, $name, $value) Stores data for a user account. Parameters string $module: The name of the module the data is associated with. int $uid: The user account ID the data is associated with. string $name: The name of the data key. mixed $value: The value to store. Non-scalar values are serialized automatically. Overrides UserDataInterface::set File core/modules/user/src/UserData.php, line 80 Class UserData Defines the user data service. Namespace Drupal\us

UserData::get

public UserData::get($module, $uid = NULL, $name = NULL) Returns data stored for a user account. Parameters string $module: The name of the module the data is associated with. int $uid: (optional) The user account ID the data is associated with. string $name: (optional) The name of the data key. Return value mixed|array The requested user account data, depending on the arguments passed: For $module, $name, and $uid, the stored value is returned, or NULL if no value was found. For $module and