Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

Drupal User data - how to store user specific content without fields

All accompanying code for the tutorial available at http://www.codesidekick.com/blog/user-data-how-store-user-specific-content-without-fields.

Usage

Set data to the user object.

global $user;
$account = entity_metadata_wrapper('user', $user);
$account->employee_number->set(60000);
entity_save('user', $account);

Get data from the user object.

global $user;
$account = entity_metadata_wrapper('user', $user);
$employee_number = $account->employee_number->value();

About

An example of how to store and retrieve complex variables in the user data column.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.