From: Brion Vibber Date: Mon, 15 Nov 2010 23:40:07 +0000 (-0800) Subject: RemoteProfileAction: redirect to the regular user profile page if given a local user. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=16f1c764c0ac89f922654f9f663faaada611b8e2;p=quix0rs-gnu-social.git RemoteProfileAction: redirect to the regular user profile page if given a local user. --- diff --git a/plugins/ModPlus/remoteprofileaction.php b/plugins/ModPlus/remoteprofileaction.php index ca82045111..9c089ee23e 100644 --- a/plugins/ModPlus/remoteprofileaction.php +++ b/plugins/ModPlus/remoteprofileaction.php @@ -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());