aboutsummaryrefslogtreecommitdiff
path: root/mod/messages/pages/messages/read.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/messages/pages/messages/read.php')
-rw-r--r--mod/messages/pages/messages/read.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/messages/pages/messages/read.php b/mod/messages/pages/messages/read.php
index fd3b466a1..eb36eaa4b 100644
--- a/mod/messages/pages/messages/read.php
+++ b/mod/messages/pages/messages/read.php
@@ -8,8 +8,8 @@
gatekeeper();
$message = get_entity(get_input('guid'));
-if (!$message) {
- forward('messages/inbox');
+if (!$message || !elgg_instanceof($message, "object", "messages")) {
+ forward('messages/inbox/' . elgg_get_logged_in_user_entity()->username);
}
// mark the message as read