]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/profileaction.php
Redirect to group URL for /nickname pattern
[quix0rs-gnu-social.git] / lib / profileaction.php
index 592364009781a73ecc3c5e83cd3e1fcfa7e3c1a6..bd5bb5a148d2290524d97e972e152f6dcc1b9672 100644 (file)
@@ -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);
             }