- if (!$this->profile) {
- // TRANS: Error message displayed when referring to a user without a profile.
- $this->serverError(_('User has no profile.'));
- return false;
+ 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())));
+ }