<?php
/* @var \Tangibledesign\MyHome\Widgets\User\UserNameWidget $mhCurrentWidget */
global $mhCurrentWidget;

$mhUser = $mhCurrentWidget->getUser();
ray($mhUser);
if (!$mhUser) {
    return;
}

if ($mhCurrentWidget->linkUser()) : ?>
    <a href="<?php echo esc_url($mhUser->getUrl()); ?>" class="myhome-user-name">
        <?php echo esc_html($mhUser->getDisplayName()); ?>
    </a>
<?php else : ?>
    <div class="myhome-user-name">
        <?php echo esc_html($mhUser->getDisplayName()); ?>
    </div>
<?php
endif;