The hook documentation in the file authentication.php doesn't say that hook_auth() is only invoked when the user logs in using the user@domain format login info (ie a non-local login). Ie. if you login with just username, hook_auth() isn't called for modules. It should say that.

See discussion in related issues:

Since this issue refers to documentation in code, I'm not sure if this issue should be submitted under documentation or code. Apologies if I'm submitting it in the wrong place.

Ben in DC
PublicMailbox at benslade dot com

Comments

chx’s picture

Project: Drupal core » Documentation
Component: user system » Admin Guide

Then this is a docs issue.

xurizaemon’s picture

Version: 4.6.3 »

I see that this is an outstanding issue from 2005, but I believe it also no longer applies.

At least in my tests with D5, hook_auth() seems to be called for local logins.

This page comes up at the top of a Google for "hook_auth()", so it may be worth closing the issue if it's outdated.

nielsbom’s picture

Component: Admin Guide » Correction/Clarification

Changed the component to reflect the new component categorization. See http://drupal.org/node/301443
-nielsbom

dawehner’s picture

Component: Correction/Clarification » Outdated
Status: Active » Needs review

hook_auth is only called when
1. local authentication fails
or
external users

dami’s picture

Status: Needs review » Closed (fixed)

Yes, it's an 3-year-old issue, and things have changed. The issue no longer stands, and the title is misleading.
I'll just close it.