$out->elementStart('div', array('class' => 'e-content poll-content'));
$poll = Poll::getByNotice($notice);
if ($poll) {
- if ($user) {
+ if ($user instanceof User) {
$profile = $user->getProfile();
$response = $poll->getResponse($profile);
if ($response) {