/**
 * Return user profile link around the given user name.
 *
 * The parameters use a trick of the sorteable table, where the first param is
 * the original value of the column
 * @param   string  User name (value of the column at the time of calling)
 * @param   string  URL parameters
 * @param   array   Row of the "sortable table" as it is at the time of function call - we extract the user ID from there
 * @return  string  HTML link
 */
function user_name_filter($name, $url_params, $row)
{
    $tab_user_info = Database::get_user_info_from_id($row[0]);
    $username = api_htmlentities(sprintf(get_lang('LoginX'), $tab_user_info['username']), ENT_QUOTES);
    return '<a href="../user/userInfo.php?uInfo=' . $row[0] . '&amp;' . $url_params . '" title="' . $username . '">' . $name . '</a>';
}