aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-07-28 05:01:52 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-07-28 05:01:52 -0700
commiteaf713bd15ca7d897c3db5e901e29ecaee7f806c (patch)
tree5172e6058452cd4ec932776540aaaee6a96cd412 /mod
parentfac6e7e60b65beae0d18badb95663540ee1f8761 (diff)
downloadvolse-hubzilla-eaf713bd15ca7d897c3db5e901e29ecaee7f806c.tar.gz
volse-hubzilla-eaf713bd15ca7d897c3db5e901e29ecaee7f806c.tar.bz2
volse-hubzilla-eaf713bd15ca7d897c3db5e901e29ecaee7f806c.zip
wrong profile in update_profile when local_user() looks at different profile on same site
Diffstat (limited to 'mod')
-rw-r--r--mod/profile.php22
1 files changed, 4 insertions, 18 deletions
diff --git a/mod/profile.php b/mod/profile.php
index 9536cff7f..b63ec7250 100644
--- a/mod/profile.php
+++ b/mod/profile.php
@@ -77,8 +77,9 @@ function profile_content(&$a, $update = false) {
$tab = 'posts';
-
-
+ if(! $update) {
+ $_SESSION['profile_uid'] = $a->profile['uid'];
+ }
if(remote_user()) {
$contact_id = $_SESSION['visitor_id'];
@@ -90,22 +91,7 @@ function profile_content(&$a, $update = false) {
if($update) {
// Ensure we've got a profile owner if updating.
- if(remote_user()) {
- $r = q("SELECT `uid` FROM `contact` WHERE `id` = %d LIMIT 1",
- intval($_SESSION['visitor_id'])
- );
- if(count($r))
- $a->profile['uid'] = $r[0]['uid'];
- else
- killme();
- }
- elseif(local_user()) {
- $a->profile['uid'] = $_SESSION['uid'];
- }
- else {
- killme();
- return; // NOTREACHED
- }
+ $a->profile['profile_uid'] = $_SESSION['profile_uid'];
}
else {