- $user = User::getKV('id', $this->target->id);
- if ($user instanceof User) {
- // This is a local user -- send to their regular profile.
- common_redirect(common_local_url('showstream', array('nickname' => $user->nickname)));
+ if ($this->target->isLocal()) {
+ // For local users when accessed by id number, redirect to
+ // the same action but using the nickname as argument.
+ common_redirect(common_local_url($this->getActionName(),
+ array('nickname'=>$user->getNickname())));