2

I'm trying to bulk-add some users, all columns of the users table are clear less the last, the data which has some serialised data like this:

a:2:{s:13:"form_build_id";s:32:"form-153847821e107639110c0cae645b3d88";s:4:"contact";i:0;s:11:"newsletters";a:2:{i:67;i:42;}}

I'm looking for a syntax/reference for this field, so I know what I'm getting into.

thanks

1 Answer 1

1

There isn't a 'schema' as such, the values can be absolutely anything (that's why a serialised array is used rather than having statically defined fields).

From the user_schema() docs:

A serialized array of name value pairs that are related to the user. Any form values posted during user edit are stored and are loaded into the $user object during user_load(). Use of this field is discouraged and it will likely disappear in a future version of Drupal.

2
  • thank you, now I understand a bit more, do I stand any chance to see what's the usage of the data, which plugin has put the data there, is there any kind of signature or it's mostly guesswork?
    – pax
    Commented Jan 9, 2014 at 14:23
  • There really isn't unfortunately. Any module could add that data at any point during the page lifecycle, through a form alter, page callback, user hook, entity hook, the list goes on. I'd imagine that lack of structure is why it's advisable not to use it, and why it'll be removed soon enough
    – Clive
    Commented Jan 9, 2014 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.