diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-15 17:05:07 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-15 17:05:07 +0000 |
commit | 459067453645ba39d10bac469e29987596512987 (patch) | |
tree | a6c506ce49af9618c604c628339d53ab58052aea /views/default/page_elements | |
parent | fe37a38096d79385829221f35a7b3082129cb468 (diff) | |
download | elgg-459067453645ba39d10bac469e29987596512987.tar.gz elgg-459067453645ba39d10bac469e29987596512987.tar.bz2 |
Owner block defaults to current logged in user.
git-svn-id: https://code.elgg.org/elgg/trunk@1942 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page_elements')
-rw-r--r-- | views/default/page_elements/owner_block.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/views/default/page_elements/owner_block.php b/views/default/page_elements/owner_block.php index f2da49197..48aaa106d 100644 --- a/views/default/page_elements/owner_block.php +++ b/views/default/page_elements/owner_block.php @@ -16,7 +16,9 @@ $contents = "";
// Is there a page owner?
- if ($owner = page_owner_entity()) {
+ $owner = page_owner_entity();
+ if (!$owner && isloggedin()) $owner = $_SESSION['user'];
+ if ($owner) {
$icon = elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
if ($owner instanceof ElggUser || $owner instanceof ElggGroup) {
$info = $owner->name;
|