Simple: How do I add data into custom field while creating new user with user_save With each user I create when my form is submitted, I want to insert an id into a field/column I've added to the users table. Trouble is, the column isn't receiving the value. I've tried a few variations of user_save() to coax it into inserting the value, but at this point I think I'm missing something fundamental of drupal 7.  Later I also need to retrieve this value from the current user.

I'd appreciate any help. Thanks.

&lt;?php
//Func called in form submit. Values passed from there
function fsa_create_sponsor_admin($sponsor_id, $a_fname, $a_lname, $a_email){

//Misc. code. . . .

//create a new user
$account = new stdClass();
$account-&gt;is_new = TRUE;
$account-&gt;name = $user_name;
$account-&gt;mail = $a_email;
$account-&gt;init = $a_email;
//$account-&gt;sponsor_id = $sponsor_id; (no error, but not working here)
$account-&gt;status = TRUE;
$account-&gt;roles = $new_user_roles;
$account-&gt;timezone = variable_get('date_default_timezone', '');

//First variation of user_save()
user_save($account, array('pass' =&gt; $sp_password, 'sponsor_id' =&gt; $sponsor_id));

//Second variation of user_save()
user_save($account, array('pass' =&gt; $sp_password, 'field_other' =&gt; array(LANGUAGE_NONE =&gt; array(array('sponsor_id' =&gt; $sponsor_id)))/*end 2nd array*/));
}
?&gt;


Column added in hook_install()

db_add_field('users', 'sponsor_id', array('type' =&gt; 'int', 'size' =&gt; 'big', 'not null' =&gt; FALSE, 'description' =&gt; 'Sponsor to which user belongs',));
I had the a similar problem. This code helped me.
I put this code in myform_submit.

$fieldvalue = $form_state['values']['fieldname'];


//Loading the user object

$account = user_load($GLOBALS['user']-&gt;uid);


//Gettin the user data

$edit['data']['fieldname'] = $fieldvalue;


//saving the achieved data

user_save($account, $edit);


//Retrieving the user value

global $user;
$whatever = $user-&gt;data['fieldname'];