public static function accountHasMessagesInTheirInbox($uid) { $size = sizeof(StreamTable::getWallpostsForUid($uid)); return $size > 0; }
<?php slot('page_name', "Your Inbox"); if (StreamTable::accountHasMessagesInTheirInbox($sf_user->getAttribute('uid'))) { ?> <table> <?php foreach ($threads as $thread) { ?> <tr> <td><?php echo $thread['recipients']; ?> </td> <td><?php echo $thread['subject']; ?> </td> <td><?php echo link_to('Read Thread', 'messages/readThread?thread_id=' . $thread['thread_id']); ?> </td> </tr> <?php } ?> </table> <?php } else { ?>
public function getWall() { return StreamTable::getWallpostsForUid($this->uid); //return Doctrine_Core::getTable('Stream')->findOneBySourceId($this->uid); }