tag / last
  • Capture users last login date and time

    Capture users last login date and time

    Adding the first snippet to the functions.php of your wordpress theme will capture a users last login date. Recently I updated the script for the most current version of WordPress. Things have been changed to wpsnipp_get_last_login() and wpsnipp_set_last_login() should be obvious what they do. One will update the last login data in the user meta and the other will let you get the last date so you can display it on your site. We also save the current date and also the previous date so you can choose what you display to admins vs subscribers.

    Read More...