Example #1
0
if (UserHandler::isOnline($user_id)) {
    echo 'Last active ' . ago($user->time_last_active) . '<br/>';
} else {
    echo 'Offline<br/>';
}
$status = PersonalStatus::getByOwner($user_id);
if ($status && $status->text) {
    echo '<b>STATUS: ' . $status->text . '</b><br/>';
    if ($session->id != $user_id) {
        if (!Like::isLiked($status->id, STATUS, $session->id)) {
            echo ahref('u/status/like/' . $status->id, 'Like') . '<br/>';
        } else {
            echo 'You like this<br/>';
        }
    }
    $other_likes = Like::getAllExcept($status->id, STATUS, $session->id);
    if ($other_likes) {
        echo '<h2>FIXME: properly display other likes</h2>';
        d($other_likes);
    }
}
if ($user_id == $session->id) {
    echo ahref('u/edit/status', 'Change your status message') . '<br/><br/>';
}
echo 'User level: ' . UserGroupHandler::getUserLevel($user_id) . '<br/>';
$gender_id = UserSetting::get($user_id, 'gender');
$gender = Setting::getById(USERDATA_OPTION, $gender_id);
echo 'Gender: ' . $gender . '<br/>';
echo 'E-mail: ' . UserSetting::get($user_id, 'email') . '<br/>';
$pres = UserSetting::get($user_id, 'presentation');
if ($pres) {