Update field data added in user form using a hook? I've added three fields in user form. 


User code
User name
User ID.


I want to add this field data into the database. My question is, in which hook, i should write the logic of manipulating and saving data.
Hook implementation depends on when you want to manipulate the user account data. 


Before creation of a new user account, hook_user_insert().
Before updating any user account, hook_user_update().


If you need to update existing users with new data you need your own custom function that makes user of user_load() (to load a user object) &amp; user_save() (to save your manipulated user object with new data).