]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/blockedfromgroup.php
Remove CSRF protection from username/password login and from OpenID login.
[quix0rs-gnu-social.git] / actions / blockedfromgroup.php
index 934f14ec45250aedeb2787fc3e2e0387049a41a8..a0598db270e64767f3432fd3ff5e18cf1d4601fe 100644 (file)
@@ -70,14 +70,21 @@ class BlockedfromgroupAction extends GroupDesignAction
         }
 
         if (!$nickname) {
-            $this->clientError(_('No nickname'), 404);
+            $this->clientError(_('No nickname.'), 404);
             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);
+            $this->clientError(_('No such group.'), 404);
             return false;
         }