<?php
$sesData = get_usermeta($post->post_author, ‘session_tokens’, TRUE);
$loginExp = time();
if ($sesData):
foreach ($sesData as $SData):
$loginExp = ($SData[‘expiration’]) ? $SData[‘expiration’] : time();
endforeach;
endif;
// echo time();
// echo ‘current’ . time() . ‘< loginexp= ‘ . $loginExp;
// echo ‘</pre>’;
if (time() < $loginExp):
$loginStatus = ‘online’;
else:
$loginStatus = ‘offline’;
endif;
echo $loginStatus;
?>