Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UserDataInterface.php

function 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.

File

core/modules/user/src/UserDataInterface.php, line 46

Class

UserDataInterface
Defines the user data service interface.

Namespace

Drupal\user

Code

public function set($module, $uid, $name, $value);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal