<?php
function smarty_modifier_get_user($id)
{
global $mysqli;
$sql = "SELECT username FROM users WHERE id='$id' LIMIT 1";
$query = $mysqli->query($sql);
$row = $query->fetch_assoc();
return $row['username'];
}

?>