public function get($id)
{
if ($this->user->getClass() < User::CLASS_ADMIN) {
throw new Exception(L::get("PERMISSION_DENIED"), 401);
}
$sth = $this->db->prepare('SELECT * FROM staffmessages WHERE id = ?');
$sth->bindParam(1, $id, PDO::PARAM_INT);
$sth->execute();
$res = $sth->fetch(PDO::FETCH_ASSOC);
if (!$res) {
throw new Exception(L::get("MESSAGE_NOT_FOUND"), 404);
}
return $res;
}