user_login_finalize(UserInterface $account)
Finalizes the login process and logs in a user.
The function logs in the user, records a watchdog message about the new session, saves the login timestamp, calls hook_user_login(), and generates a new session.
The current user is replaced with the passed in account.
Parameters
\Drupal\user\UserInterface $account: The account to log in.
See also
hook_user_login()
File
core/modules/user/user.module, line 530 Enables the user registration and login sys