Can I work with hook_user_login() directly within user.api.php? Somewhat new to Drupal... this is probably a softball for all you Drupal pros out there.

I need to update a custom table in the database each time a user logs into Drupal.  I thought I'd be able to do this within user.api.php and specifically within hook_user_login but it's as if none of the code I've put in there works.  To debug I added the following 2 lines to try to email myself details about $account and I never get that either.  

$o = print_r($account, true);
mail("art@geigel.com", "Login Output", $o, "FROM: no-reply@geigel.com");


I've also gone into the Drupal admin area and saved the settings page for the modules thinking it was a Drupal caching issue related to its hooks.  That didn't do it either.

Can someone tell me what I'm missing?  I'd prefer to just take care of the database stuff here instead of creating an entirely new module and implementing the hook there.

Thanks in advance.

AG3
The .api.php files are documentation only, they're never included in a request.

hook_user_login() can only be implemented in a module, so you'll need to write one for this.

It's pretty straightforward, the Module developer's guide will get you started quickly.