Storing User preferences in Drupal
You don't need to use a hook you need to use the API function user_save(). Which is a very weird function because unlike all other save functions, it has a separate argument for the things that you want to change.

Something like this should work, in your submit callback:

&lt;?php
// Make sure you are working with the fully loaded user object.
$account = user_load($GLOBALS['user']-&gt;uid);
$edit['data']['your_stuff'] = $whatever;
user_save($account, $edit);
?&gt;


FYI: user_save() is no more in Drupal 8 and instead behaves like all other entity save functions/methods in 8.x, by calling $account->save() after changing $account. See the following change record for details: http://drupal.org/node/1554986