aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/profile/start.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/mod/profile/start.php b/mod/profile/start.php
index 80f923cb3..4670fbbda 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -179,8 +179,10 @@ function profile_pagesetup()
//add submenu options
if (get_context() == "profile") {
$page_owner = page_owner_entity();
- add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/details");
- add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/icon");
+ if ($page_owner->canEdit()) {
+ add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/details");
+ add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/icon");
+ }
}
}