Creating a link to application submitter

To make a link to a user who has submitted an application for competition, you need to create a content plugin for onContentPrepare event.

In participant layout options the parameter Application Submitter should be enabled, as well as Link Submitter.

The idea is to set submitter_link property for participant object. Here is an example of onContentPrepare code:

/**
 * Retrieves the link for application submitter.
 *
 * @param   string   $context  The context of the content being passed to the plugin.
 * @param   mixed    &$item    A participant object.
 * @param   object   $params   Component parameters.
 * @param   integer  $page     Optional page number. Unused. Defaults to zero.
 *
 * @return  boolean
 */
public function onContentPrepare($context, &$item, $params, $page = 0)
{
    // Check for valid context
    if ($context != 'com_competition.participant')
    {
        return true;
    }

    // Return if we don't have valid params or don't show/link the submitter
    if (!($params instanceof Joomla\Registry\Registry)
        || !$params->get('participant_show_submitter')
        || !$params->get('participant_link_submitter'))
    {
        return true;
    }

    // Return if we don't have a valid submitter id
    if (!isset($item->userId) || !(int) $item->userId)
    {
        return true;
    }

    // Set the link to submitter
    $item->submitter_link = JRoute::_('index.php?option=com_somecomponent&profile=' . $item->userId);

    return true;
}