Is there a good hook for on CiviCRM sign in?
[This is to display a message upon login in a cms-independent extension.]
Thanks,
Login is a CMS event, not a CiviCRM event. This means you can access it readily from a CMS plugin/extension/module ... but not from a CiviCRM extension.
hook_user_login()
hookhook_user_login()
hookwp_login
eventonUserAuthentication
event (?)If you wanted to access this from a CiviCRM extension, you'd need to use some event which fires at the time of login. You might be able to identify one using the contrib.showallthehooks
extension to reveal which hooks get fired at the point of login. Might need to check it was going to fire for each of the CMS platforms, since behaviour could vary.
civicrm_user_login()
then your extension could define same to have it called in Drupal, but it might not be loaded in time, and you'd be risking a collision if CiviCRM or another extension ever incorporating their own definition of the same.)
Commented
Nov 8, 2017 at 20:28