<?php
// Helper functions for use around the site.

function getFriendlyUserName() {
	$kirby = kirby();
	if ($kirby->user()->name() && strlen($kirby->user()->name()) > 1) {
		$friendly = esc($kirby->user()->name(), 'html');
	} else {
		$friendly = esc($kirby->user()->email(), 'html');
	}

	return $friendly;
}

?>
