+ if (empty($this->group)) {
+ $alias = Group_alias::getKV(
+ 'alias',
+ common_canonical_nickname($this->arg('id'))
+ );
+ if (!empty($alias)) {
+ $args = array('id' => $alias->group_id, 'format' => $this->format);
+ common_redirect(common_local_url('ApiGroupShow', $args), 301);
+ } else {
+ // TRANS: Client error displayed when trying to show a group that could not be found.
+ $this->clientError(_('Group not found.'), 404);
+ }
+ return;
+ }
+