]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Redirect to group URL for /nickname pattern
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 26 May 2015 11:10:37 +0000 (13:10 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 26 May 2015 11:10:37 +0000 (13:10 +0200)
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);
             }