[development] Let's kill $user->data
weitzman at tejasa.com
Wed Nov 22 14:31:15 UTC 2006
Karoly Negyesi wrote:
> Two steps
> a) We remove $user->data handling code from D6 core. No save, no load.
> New installs won't have this column.
> b) D7 will drop the $user->data if it exists. (SELECT * FROM user,
> $account = db_fetch_array, if(isset($account['data'])) -- no need for
> DDL to check for a column).
> This way D6 contribs can clean up $user->data and migrate to their own
yes - this is long overdue. ... that column causes problems for the
cascading variable system that adrian proposed.
one way for custom modules to move away from that column is to simply add a
properly named column to users table, and save data there. no further code
is required for simple fields. so this can be done as a module update and no
module code needs to change. i recommend this method mainly for custom
modules on sites, not for contrib/core modules. those should use own table.
custom columns in users table get automatically loaded/saved - a nice,
little known feature of user.module.
More information about the development