aboutsummaryrefslogtreecommitdiff
path: root/views/default/layout/shells/content
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/layout/shells/content')
-rw-r--r--views/default/layout/shells/content/header.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/views/default/layout/shells/content/header.php b/views/default/layout/shells/content/header.php
index 3f6fc5c5a..029794408 100644
--- a/views/default/layout/shells/content/header.php
+++ b/views/default/layout/shells/content/header.php
@@ -26,8 +26,10 @@ if ($context) {
$buttons = $vars['buttons'];
} else {
if (isloggedin() && $context) {
- $guid = elgg_get_page_owner_guid();
- if (!$guid) {
+ $owner = elgg_get_page_owner();
+ if (elgg_instanceof($owner, 'group')) {
+ $guid = $owner->getGUID();
+ } else {
$guid = get_loggedin_userid();
}
$new_link = elgg_get_array_value('new_link', $vars, "pg/$context/add/$guid/");