As stated in the hook_user () documentation :
$op . ( ):
- "insert": . NULL $edit.
- "update": . NULL $edit.
- "validate": . , .
hook_install().
hook_user() , :
function perscriptions_user($op, &$edit, &$account, $category = NULL){
if ($op == 'register' || ($op == 'form' && $category = 'account')) {
$form['surgery_address'] = array (
'#type' => 'textarea',
'#title' => t('Surgery Address'),
'#required' => TRUE,
);
return $form;
}
if ($op == 'insert' || $op == 'update') {
prescriptions_save_user_profile($account->uid, $edit['surgery_address']);
}
if ($op == 'validate' && $category == 'account') {
}
}
prescriptions_save_user_profile() - , . , , .