Elzo Valugi
Elzo Valugi

Reputation: 27866

Custom user variable for user object

How can I add a custom user variable for the user object? I want something that a user can customize in their profile page and that I can retrieve in the user object in another module, for example a preference for currency USD or EURO.

I would accept the simplest idea that doesn't involve writing a module, unless is no other way.

Upvotes: 2

Views: 377

Answers (1)

wildpeaks
wildpeaks

Reputation: 7392

You can use the Profile module to define additional settings that users will be able to edit in their profile page and will be available in the $user object: http://drupal.org/documentation/modules/profile

Furthemore, you should read How to create new profile fields.

Upvotes: 5

Related Questions