Skip to main content
Post Made Community Wiki
Source Link
Yuseferi
  • 22.2k
  • 22
  • 118
  • 218

A way is add a submit function to user_register_form submits in form alter.

yourmodule_form_alter(&$from,$form_state,$form_id) {
  if ($form_id == 'user_register_form ) { 
       $form['#submit'][] = 'sugar_crm_user_register_submit';
       }
 }

but I think the better way is setup your custom function in hook_user_insert.this hook triggered when a user registered . you can implement it in your custom module.

  function yourmodule_user_insert(&$edit, $account, $category) {
   // some code to run a database query in SugarCRM
  ddl("User registration form submitted to CRM"); 
  }