]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/block.php
events for blocking a user
[quix0rs-gnu-social.git] / actions / block.php
index 71a34e08793d1bdd0796748fd9c3a4bb5a3528b3..5fae45dffcd46b0140d00e1cb79488abc707a9c1 100644 (file)
@@ -156,7 +156,12 @@ class BlockAction extends ProfileFormAction
     {
         $cur = common_current_user();
 
-        $result = $cur->block($this->profile);
+        if (Event::handle('StartBlockProfile', array($cur, $this->profile))) {
+            $result = $cur->block($this->profile);
+            if ($result) {
+                Event::handle('EndBlockProfile', array($cur, $this->profile));
+            }
+        }
 
         if (!$result) {
             $this->serverError(_('Failed to save block information.'));
@@ -164,4 +169,3 @@ class BlockAction extends ProfileFormAction
         }
     }
 }
-