RemoteProfileAction: redirect to the regular user profile page if given a local user.

This commit is contained in:
Brion Vibber 2010-11-15 15:40:07 -08:00
parent 6849b8f9e5
commit 16f1c764c0

View 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());