I want to capture the user information of the current logged in user into a database table on login.
Note:
We are in 18.2 version
Discussion posts and replies are publicly visible
As far as I know there's no out-of-the-box capability to do this. Most of the use cases I've seen that involve keeping a database table of user logins, involve parsing/reading the user login log files periodically (like at the end of each day), and then storing that data in whatever way is needed (whether it be a table of all historical logins, or simply updating a particular user's last login time).
When user login, will they redirect to any site. If so it is possible. On start form load you can persist the login user details. This is more kind of application level not platform level.
You could direct users to a "Welcome" page that doesn't let them perform any work and contains a single button.
When they press that button, they go to their real landing page. You could use the "Welcome" for all sorts of things, like broadcasting announcements that you know everyone will get. That may make up for the trade-off of needlessly adding at least another click to each User's day. All the while secretly the whole point is to attach a DB write to that button, so you at least know every time someone logs in and goes to their start page.
It helps if you upgrade to 18.4 and gain the ability to turn Tempo off. A pre-18.4 workaround I heard about is a plugin with a redirect script that kicks users back to their landing page site if they try to access Tempo URL.
That seems like a neat workaround, though maybe not all that feasible for an established / already-in-production system.
My requirement is, no asynchronous job, no change is user experience. Inclusion on welcome page becomes a change in user experience.