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 simple开发者_StackOverflowst idea that doesn't involve writing a module, unless is no other way.
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.
精彩评论