I've got a module that uses hook_user to store some calculated info for the user as a serialized object.

Everything works fine except for $op == 'load', i.e., the form works, the data is validated, it's serialized, it's saved in the database properly and it's even unserialized properly for $op == 'form'.

In hook_user, if $op == 'load', I unserialize $account->myinfo and save it back as an object in $account->myinfo.

But, later, in the theme when the code looks at $account->myinfo, $account->myinfo is serialized again.

Somewhere in the middle of things it gets switched back (I did some following of the drupal code in PHpED and saw that it was fine for a while, but got bashed. I don't know drupal's internals well enough to find where it gets changed without going through each line of code.)

I also saved the object to the $edit argument (in $edit['myinfo']) in hook_user for $op='load'.

What's up? What am I doing wrong? (BTW - this is drupal 6.3)

Thanks in advance for any help!

mitch