Im a complete nooby with php so I'm trying to find a code that will retrieve a username from a table (contentbuilder) and put that username in the recipient field of a Joomla messaging extension, uddeim.

the code the developer gave me:
<?php
$user = JFactory::getUser();
?>
<a href="/<?php echo
JRoute::_('index.php?option=com_uddeim&task=new&runame='.$user->get('username'));
?>">PM</a>

But it does not work.
Please help.