user_authenticate() function not working
user_authenticate($name, $pass) (Drupal 7) will return the user ID on successful authentication, or FALSE on failure. In Drupal 6, it will return the user info array.