aboutsummaryrefslogtreecommitdiff
path: root/mod/messages/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'mod/messages/views/default')
-rw-r--r--mod/messages/views/default/messages/messages.php6
-rw-r--r--mod/messages/views/default/messages/topbar.php4
-rw-r--r--mod/messages/views/default/messages/view.php4
3 files changed, 7 insertions, 7 deletions
diff --git a/mod/messages/views/default/messages/messages.php b/mod/messages/views/default/messages/messages.php
index 364a80b4f..e2bce0f44 100644
--- a/mod/messages/views/default/messages/messages.php
+++ b/mod/messages/views/default/messages/messages.php
@@ -19,7 +19,7 @@ if(get_input("type") == "sent"){
$type = "sent";
} else {
//send back to the users inbox
- $url = $vars['url'] . "pg/messages/" . $vars['user']->username;
+ $url = $vars['url'] . "pg/messages/" . get_loggedin_user()->username;
// set up breadcrumbs context
elgg_push_breadcrumb(elgg_echo('messages:inbox'), $url);
//this is used on the delete link so we know which type of message it is
@@ -34,8 +34,8 @@ if (strncmp($reply_title, "RE:", 3) != 0) {
if (isloggedin())
if (isset($vars['entity'])) {
- if ($vars['entity']->toId == $vars['user']->guid
- || $vars['entity']->owner_guid == $vars['user']->guid) {
+ if ($vars['entity']->toId == get_loggedin_userid()
+ || $vars['entity']->owner_guid == get_loggedin_userid()) {
// display breadcrumbs
elgg_push_breadcrumb($vars['entity']->title);
echo elgg_view('navigation/breadcrumbs');
diff --git a/mod/messages/views/default/messages/topbar.php b/mod/messages/views/default/messages/topbar.php
index 4af635612..4aa23b91a 100644
--- a/mod/messages/views/default/messages/topbar.php
+++ b/mod/messages/views/default/messages/topbar.php
@@ -17,10 +17,10 @@ if($num_messages){
if($num == 0) {
?>
- <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages" >&nbsp;</a>
+ <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages" >&nbsp;</a>
<?php
}else{
?>
- <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages new" ><span><?php echo $num; ?></span></a>
+ <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo get_loggedin_user()->username; ?>" class="privatemessages new" ><span><?php echo $num; ?></span></a>
<?php
}
diff --git a/mod/messages/views/default/messages/view.php b/mod/messages/views/default/messages/view.php
index feaf6c0c2..41ad11104 100644
--- a/mod/messages/views/default/messages/view.php
+++ b/mod/messages/views/default/messages/view.php
@@ -22,7 +22,7 @@ if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) {
$counter = 0;
foreach($vars['entity'] as $message) {
- if ($message->owner_guid == $vars['user']->guid || $message->toId == $vars['user']->guid) {
+ if ($message->owner_guid == get_loggedin_userid() || $message->toId == get_loggedin_userid()) {
//make sure to only display the messages that have not been 'deleted' (1 = deleted)
if($message->hiddenFrom != 1){
@@ -71,7 +71,7 @@ if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) {
echo "<div class='message sent clearfloat'>";
//get the icon for the user the message was sent to
echo "<div class='entity_listing_icon'>".elgg_view("profile/icon",array('entity' => $user, 'size' => 'tiny'))."</div>";
- echo "<div class='entity_listing_info'><div class='message_sender'>".$_SESSION['user']->name."<p class='entity_subtext'>".elgg_view_friendly_time($message->time_created)."</p></div>";
+ echo "<div class='entity_listing_info'><div class='message_sender'>".get_loggedin_user()->name."<p class='entity_subtext'>".elgg_view_friendly_time($message->time_created)."</p></div>";
// display message subject
echo "<div class='message_subject'>";
//display the link to 'delete'