how to retrieve password from within hook_user_presave() I am trying to catch the inputed password on the user registration page from within the hook_user_presave(). I want to send this password out to an external database for storage. However, when I analyzed the $edit variable, I found that the password field was returning an encrypted password.

Is there any way for me to retrieve the actual password?
It us not advised not to use the user's password as a raw value, however if you still want to access the password field value in unencrypted form than try the following:


&lt;?php
/**
 * Implements hook_form_alter().
 * Alters user_register_form.
 */
function MyModule_form_alter(&amp;$form, $form_state, $form_id) {
  // Add the additional validation callback for the user registration form.
  if ($form_id == 'user_register_form') {
    $form['#validate'][] = 'MyModule_user_register_form_validate';
  }
}

// Callback function for Validation handler of user_register_form.
function MyModule_user_register_form_validate($form, &amp;$form_state) {
  if (isset($form_state['values']['pass'])) {
    // Here you will get the value of password.
    $password = $form_state['values']['pass'];
  }
}
?&gt;