User last login and user last visit problem
When you are using human_time_diff for convert time to human readable format. your last_visit meta empty that is why it is return 50 years. so before convert human_time_diff you have to check value is not empty. use below code to display last_login, last_visit. $users = get_users(); foreach( $users as $user ) { $udata = get_userdata( … Read more