Created
August 30, 2013 20:43
-
-
Save achilles283/6394098 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php //associating a function to login hook add_action('wp_login', 'set_last_login'); //function for setting the last login function set_last_login($login) { $user = get_userdatabylogin($login); //add or update the last login value for logged in user update_usermeta( $user->ID, 'last_login', current_time('mysql') ); } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment