]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
RemoteProfileAction: redirect to the regular user profile page if given a local user.
authorBrion Vibber <brion@pobox.com>
Mon, 15 Nov 2010 23:40:07 +0000 (15:40 -0800)
committerBrion Vibber <brion@pobox.com>
Mon, 15 Nov 2010 23:40:07 +0000 (15:40 -0800)
plugins/ModPlus/remoteprofileaction.php

index ca82045111112611c14a3311a4158ccbea8d1828..9c089ee23e76db9f56ff55c6dd6e0e2047c3f716 100644 (file)
@@ -19,6 +19,14 @@ class RemoteProfileAction extends ShowstreamAction
             return false;
         }
 
+        $user = User::staticGet('id', $this->profile->id);
+        if ($user) {
+            // This is a local user -- send to their regular profile.
+            $url = common_local_url('showstream', array('nickname' => $user->nickname));
+            common_redirect($url);
+            return false;
+        }
+
         $this->tag = $this->trimmed('tag');
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
         common_set_returnto($this->selfUrl());