Hi All,

I have used number of times drupal core function "user_authenticate" to authenticate the check if user exists, but not sure why the function is not returning anything this time while it is suppose to return the id of that user. Please help !!

$userId = user_authenticate('username', 'userpassword');
echo $userId;

Thanks,
Neeraj

Comments

dcam’s picture

Category: Bug report » Support request
Issue tags: -authentication, -user_authenticate

Is it not returning anything at all or is it failing to authenticate and returning FALSE?

If it's not returning anything, then my first guess is that the function is out of scope. Did you include the user.module file? Is there anything in your PHP error log that would indicate the problem?

dcam’s picture

Assigned: neerajsukheja » Unassigned
Status: Active » Closed (cannot reproduce)

Closing old issues. The OP never replied back.