The Drupal users table has a column named "data". I can see it stores serialized data, but can't seem to find *where* in the code this data is being stored. I need to understand what this column is for, and how to administer it's contents.
A much requested future for Drupal is that it stores the state of fieldsets (eg. collapsed or not) somewhere. Using a cookie for this purpose is not smart, because of the data-limitations (4KB in IE, for instance). I would like to figure out a common way for Drupal (modules) to store state data in users.data, storing/retrieving it through an AJAX call.
For this, I need some information about:
- whether modules (by Drupal principles) are allowed to use users.data to store information (or is it intended solely for core?)
- where in the Drupal source I can find examples of code storing/retrieving data from/to users.data
Any help would be greatly appreciated!
Comments
It really would be more
It really would be more efficient to provide your own table for storing such information. With your own table you could have columns for user id, form id, fieldset id and state. This would allow you to read the information for a given form (and only that form) with on query.
user save
You can add extra data there using user_save but it's not a great solution. I did that for a custom module and it's a pain because there's no easy way to clean all that data out because it's serialized and part of the user record. I second the other person's suggestion of making your own table.
Michelle
--------------------------------------
See my Drupal articles and tutorials or come check out life in the Coulee Region.