how to use hook_user_login to catch username and password I am trying to catch the username and password which are entered on the user login form. This is my code:


function impak_integration_user_login(&$edit, $account) {
  drupal_set_message("Welcome User!" . print_r($edit). print_r($account));
  global $user;
  drupal_set_message(print_r($user));
  }


The hook does work, as It does print out the Welcome message after login. However, I can't figure out how to get any of the user information, specifically the entered username and password.
The information send in the login form is in the $edit array. You can get this information as follows:

function YOURMODULE_user_login(&amp;$edit, $account) {
  $username = $edit['input']['name'];
  $password = $edit['input']['pass'];
  drupal_set_message("Welcome $username your password is $password");
}