Question

I have a external database (oracle) at my Drupal website. When the user changes email and password (it's stored at internal dabatase) I need obtain this changes for update this information to a specific table at my external database

i think that it's possible to do using form_alter for user settings form, but I don't know how. The password I need without encrypt.

Was it helpful?

Solution

I resolved this issue with this code

function mymodule_form_alter(&$form, &$form_state, $form_id) {   
  if ($form_id == "user_profile_form") {

    $form['#submit'][] = 'mymodule_form_submit';


  }
}

function mymodule_form_submit(&$form, &$form_state){

  // Some code and access to values like $form_state['values']['fieldXXXX']);

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top