Use another action instead of the shortcode API to display the last time a user logged in
You don’t need to store that information, WordPress already does this, and it does this across multiple sessions. If you log in on your phone, and on your PC, then go to your user in WP Admin, you’ll see them listed with a button to log you out on the other devices. Additionally, WordPress stores … Read more