From: Mikael Nordfeldth Date: Tue, 26 May 2015 11:10:37 +0000 (+0200) Subject: Redirect to group URL for /nickname pattern X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bb8d377b91c959d89e9b8099a97962d5c777f61d;p=quix0rs-gnu-social.git Redirect to group URL for /nickname pattern --- diff --git a/lib/profileaction.php b/lib/profileaction.php index 5923640097..bd5bb5a148 100644 --- a/lib/profileaction.php +++ b/lib/profileaction.php @@ -66,6 +66,10 @@ abstract class ProfileAction extends ManagedAction $this->user = User::getKV('nickname', $nickname); if (!$this->user) { + $group = Local_group::getKV('nickname', $nickname); + if ($group instanceof Local_group) { + common_redirect($group->getProfile()->getUrl()); + } // TRANS: Client error displayed when calling a profile action without specifying a user. $this->clientError(_('No such user.'), 404); }