tags:

views:

147

answers:

1

The documentation reads:

Helper function for authentication modules. Either login in or registers the current user, based on username. Either way, the global $user object is populated based on $name.

It seems to me that this function does not actually perform a login (it does not trigger the user_hook with op=login. It does not call user_external_login or even user_authenticate_finalize.

Am I interpreting it wrong?

+1  A: 

I looked through the code, and it doesn't invoke hook_user() op = 'login'. You can do that in your own module though.

Look at user_module_invoke() to do this.

googletorp
agreed that it doesnt invoke login -- wouldn't this imply that the func is not really performing login?
Hortitude
Well it does log the user in, the user will not be anonymous anymore, but he will be his user, has access, and things he do, will be accredited him. But other modules wont get a chance to react on it.
googletorp

related questions