I'm working with Drupal 7, the function **user_authenticate()**
working fine with the default User module, but I have implemented a custom "user login" module, and I use this same function in that module, but somehow it is not working at all in this new module.
When we are using this function in default module, it's retrieving all the records based on the user parameters, but in my case it's retrieving nothing.
This is the code that I have put in my custom module file.
if (module_exists('user')) {
$username = $form_state['values']['name'];
$pass = trim($form_state['values']['pass']);
$userRecord = user_authenticate($username, $pass);
print_r($userRecord); // its resulting me BLANK!!
exit;
}
Can anybody help me out please? What would the problem be?