Redirect to group URL for /nickname pattern

This commit is contained in:
Mikael Nordfeldth 2015-05-26 13:10:37 +02:00
parent 4a6f509aa5
commit bb8d377b91
1 changed files with 4 additions and 0 deletions

View 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);
}