summaryrefslogtreecommitdiff
path: root/actions/joingroup.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/joingroup.php')
-rw-r--r--actions/joingroup.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/actions/joingroup.php b/actions/joingroup.php
index 235e5ab4c..ba642f712 100644
--- a/actions/joingroup.php
+++ b/actions/joingroup.php
@@ -77,7 +77,14 @@ class JoingroupAction extends Action
return false;
}
- $this->group = User_group::staticGet('nickname', $nickname);
+ $local = Local_group::staticGet('nickname', $nickname);
+
+ if (!$local) {
+ $this->clientError(_('No such group.'), 404);
+ return false;
+ }
+
+ $this->group = User_group::staticGet('id', $local->group_id);
if (!$this->group) {
$this->clientError(_('No such group.'), 404);