function UserDataInterface::set
Same name in other branches
- 9 core/modules/user/src/UserDataInterface.php \Drupal\user\UserDataInterface::set()
- 10 core/modules/user/src/UserDataInterface.php \Drupal\user\UserDataInterface::set()
- 11.x core/modules/user/src/UserDataInterface.php \Drupal\user\UserDataInterface::set()
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.
1 method overrides UserDataInterface::set()
- UserData::set in core/
modules/ user/ src/ UserData.php - Stores data for a user account.
File
-
core/
modules/ user/ src/ UserDataInterface.php, line 46
Class
- UserDataInterface
- Defines the user data service interface.
Namespace
Drupal\userCode
public function set($module, $uid, $name, $value);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.