]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/blockedfromgroup.php
modify group actions so they use Local_group to look up by nickname
[quix0rs-gnu-social.git] / actions / blockedfromgroup.php
index 0b4caf5bf34e742928bba6aed4e3651a271e2a43..a0598db270e64767f3432fd3ff5e18cf1d4601fe 100644 (file)
@@ -74,7 +74,14 @@ class BlockedfromgroupAction extends GroupDesignAction
             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);