forked from GNUsocial/gnu-social
Redirect to group URL for /nickname pattern
This commit is contained in:
parent
4a6f509aa5
commit
bb8d377b91
@ -66,6 +66,10 @@ abstract class ProfileAction extends ManagedAction
|
|||||||
$this->user = User::getKV('nickname', $nickname);
|
$this->user = User::getKV('nickname', $nickname);
|
||||||
|
|
||||||
if (!$this->user) {
|
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.
|
// TRANS: Client error displayed when calling a profile action without specifying a user.
|
||||||
$this->clientError(_('No such user.'), 404);
|
$this->clientError(_('No such user.'), 404);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user