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.
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
Hook implementation depends on when you want to manipulate the user account data.
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) &
user_save() (to save your manipulated user object with new data).