aboutsummaryrefslogtreecommitdiff
path: root/mod/profile/actions
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profile/actions')
-rw-r--r--mod/profile/actions/edit.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/mod/profile/actions/edit.php b/mod/profile/actions/edit.php
index 7ace0a22b..7a74535cd 100644
--- a/mod/profile/actions/edit.php
+++ b/mod/profile/actions/edit.php
@@ -22,7 +22,13 @@
}
// Save stuff if we can, and forward to the user's profile
- $user = $_SESSION['user'];
+
+ if ($user = page_owner()) {
+ $user = page_owner_entity();
+ } else {
+ $user = $_SESSION['user'];
+ set_page_owner($user->getGUID());
+ }
if ($user->canEdit()) {
// Save stuff