Search
 
SCRIPT & CODE EXAMPLE
 

PHP

last login date time in wordpress

#Set
function user_last_login( $user_login, $user ) {
    update_user_meta( $user->ID, 'last_login', time() );
}
add_action( 'wp_login', 'user_last_login', 10, 2 );

#get
echo get_user_meta( $user->ID, 'last_login' , true );
Comment

PREVIOUS NEXT
Code Example
Php :: hashing passwords in yii 1 
Php :: php model last record 
Php :: laravel withtrashed 
Php :: php sha256 example 
Php :: laravel rename column 
Php :: convert space to 20 php 
Php :: laravel find or fail exception 
Php :: symfony clear cache 
Php :: php mysql insert data 
Php :: php yesterday date 
Php :: laravel 8 bootstrap pagination fix 
Php :: form validation nullable laravel 
Php :: phpMyAdmin is not able to cache templates 
Php :: jdate get one day before php 
Php :: pdo connexion 
Php :: laravel collection shuffle 
Php :: get all pages list from specific template 
Php :: laravel controller return message 
Php :: echo first 100 prime numbers php 
Php :: php refresh page 
Php :: yii2 redirect back 
Php :: php move file 
Php :: php default timezone 
Php :: unset _post 
Php :: laravel log permission denied mac 
Php :: increase the number in php by a certain percentage 
Php :: php code to hide plugin update for wordpress 
Php :: how to switch from php7.4 to php7.3 mac 
Php :: laravel migration column type json 
Php :: php get number from string 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =