]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/joingroup.php
modify group actions so they use Local_group to look up by nickname
[quix0rs-gnu-social.git] / actions / joingroup.php
index 235e5ab4c2c8ea792de834ce745079bd7c7dc45c..ba642f71293b13743b8f86df5511cb7d5e26c770 100644 (file)
@@ -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);