]> git.mxchange.org Git - friendica.git/commitdiff
wrong profile in update_profile when local_user() looks at different profile on same...
authorMike Macgirvin <mike@macgirvin.com>
Wed, 28 Jul 2010 12:01:52 +0000 (05:01 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Wed, 28 Jul 2010 12:01:52 +0000 (05:01 -0700)
mod/profile.php

index 9536cff7f0fd32c9d1df747478a2db360c9e6a9a..b63ec72508ee8bd44176cd8634dcb064b5e6c299 100644 (file)
@@ -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 {