I want to implement some additional validation steps right after a user has logged in to a Drupal site.
So far, I have implemented the additional validation inside
hook_user_login. If the validation fails, I am forcing the logout by calling
EDIT: Part of the users are authenticated through an external SSO, so altering the login form to add an additional validation does not seem to be a good solution.
Is this the most standard way to do it, or is there a better way?