dev/drupal#54 Remove hook_user_login, fixes the masquerade module
Created by: mlutfy
The hook_user_login implementation was added by Torrance during the initial port to Drupal8. The Drupal7 implementation does not implement this hook.
It causes problems with the Drupal 'masquerade' module, causing the user to be logged out when attempting to masquerade. This is because the synchronizeUser() function resets the PHP session.
More details here:
I tested the following use-cases:
- As a Drupal admin, I created a new Drupal user, then logged-in with that user. The contact+user were in sync.
- As a CRM admin, with the Actions -> Create CMS account, I created a Drupal account for a user, then logged-in with that account. Also OK.
Looking on the initial commit (29b7571e), there doesn't seem to be a reason for the hook, so it feels safe to remove.