aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/forum
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views/default/forum')
-rw-r--r--mod/groups/views/default/forum/topicposts.php18
-rw-r--r--mod/groups/views/default/forum/topics.php3
2 files changed, 13 insertions, 8 deletions
diff --git a/mod/groups/views/default/forum/topicposts.php b/mod/groups/views/default/forum/topicposts.php
index 89c943019..73ba1ee90 100644
--- a/mod/groups/views/default/forum/topicposts.php
+++ b/mod/groups/views/default/forum/topicposts.php
@@ -21,13 +21,17 @@
<td>
<?php
//get infomation about the owner of the comment
- $post_owner = get_user($vars['entity']->owner_guid);
-
- //display the user icon
- echo "<div class=\"post_icon\">" . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'small')) . "</div>";
-
- //display the user name
- echo "<p><b>" . $post_owner->name . "</b><br />";
+ if ($post_owner = get_user($vars['entity']->owner_guid)) {
+
+ //display the user icon
+ echo "<div class=\"post_icon\">" . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'small')) . "</div>";
+
+ //display the user name
+ echo "<p><b>" . $post_owner->name . "</b><br />";
+
+ } else {
+ echo "<p>";
+ }
//display the date of the comment
echo "<small>" . friendly_time($vars['entity']->time_created) . "</small></p>";
diff --git a/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php
index b574aea7c..18a8e4d0a 100644
--- a/mod/groups/views/default/forum/topics.php
+++ b/mod/groups/views/default/forum/topics.php
@@ -98,7 +98,8 @@
<p>
<?php
//display the last user to post
- echo get_user($last_user)->name;
+ if ($u = get_user($last_user))
+ echo $u->name;
?>
</p>
</td>