When a user logs in _phptemplate_variables() gets called with the "node" hook 2 times: once as an anonymous user, the second as a logged in user.
As far as I can see the call as anonymous user is triggered in index.php, by menu_execute_active_handler() which returns a string used later in index.php when a call is made to theme()

During the call to theme() drupal logs in the user and makes a new call to _phptemplate_variables() as the authenticated user.

Is this intentional? I'm finding that some messages are set in drupal messages during the call by the anonymous user that later are displayed to the authenticated user, I have to remove those messages with code, but I'd rather that they weren't set at all.

Comments

ainigma32’s picture

Status: Active » Postponed (maintainer needs more info)

I can't seem to reproduce this using 5.12 I do see multiple calls but they are all done as the same user.

Can you confirm you are still seeing this behaviour?

- Arie

ainigma32’s picture

Status: Postponed (maintainer needs more info) » Fixed

Looks like Annette Tisdale won't be posting any feedback so I'm setting this to fixed.

Feel free to reopen if you think that is wrong.

- Arie

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.