This conflict occured when using both a simple_saml auth module and legal. The simple_saml module calls user_authenticate_finalize, which calls user_module_invoke('login', $edit, $user);

Everything ok so far. Drupal starts looping all hook_user function with $op = 'login'. In the legal_user function it calls module_invoke_all('user', 'logout', NULL, $user);

Now drupal starts looping all the hook_user functions with $op = 'logout', but because it is called via module_invoke_all, which uses the php functions func_get_args() and call_user_func_array(), the variables $edit and $user are not passed by reference to the hook_user.

This can be prevented simply by changing the call in legal_user on line 289 from:

module_invoke_all('user', 'logout', NULL, $user);

to

user_module_invoke('logout', $edit, $user);

which does eventually exactly the same, but without causing conflicts and multiple watchdog errors.

Comments

arfle’s picture

Assigned: arfle » Unassigned
robert castelo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

No longer supporting Drupal 6 version of Legal, so closing this old issue.