Hi, this one has stumped me so far.
I'd like to find a user->uid based on the name of the user.
Is there a simple db_ call I can make to query the user database?

Thanks for any help.

Comments

cog.rusty’s picture

See http://api.drupal.org/api/function/user_load/5

$name = 'some-username';
$account = user_load(array('name'=>$name));
print $account->uid;