aboutsummaryrefslogtreecommitdiff
path: root/mod/profile
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile')
-rw-r--r--mod/profile/icondirect.php6
-rw-r--r--mod/profile/start.php2
2 files changed, 8 insertions, 0 deletions
diff --git a/mod/profile/icondirect.php b/mod/profile/icondirect.php
index 6c3148f2b..c4439f78c 100644
--- a/mod/profile/icondirect.php
+++ b/mod/profile/icondirect.php
@@ -11,6 +11,12 @@ require_once(dirname(dirname(dirname(__FILE__))). '/engine/settings.php');
global $CONFIG;
+// won't be able to serve anything if no joindate or guid
+if (!isset($_GET['joindate']) || !isset($_GET['guid'])) {
+ header("HTTP/1.1 404 Not Found");
+ exit;
+}
+
$join_date = (int)$_GET['joindate'];
$last_cache = (int)$_GET['lastcache']; // icontime
$guid = (int)$_GET['guid'];
diff --git a/mod/profile/start.php b/mod/profile/start.php
index abe044632..ab596f235 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -56,6 +56,8 @@ function profile_page_handler($page) {
$username = $page[0];
$user = get_user_by_username($username);
elgg_set_page_owner_guid($user->guid);
+ } elseif (elgg_is_logged_in()) {
+ forward(elgg_get_logged_in_user_entity()->getURL());
}
// short circuit if invalid or banned username