X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Funblock.php;h=0f63e1dae05802c4308f52e7f644d63fb81cbec1;hb=d0ea138888cbc5de30f2c9a52a771921efa9fdc1;hp=c60458cd3ca810486714a1ea184e30d06cd51f45;hpb=a42e128c1532c45fd930d98c985f9a8d98ff6868;p=quix0rs-gnu-social.git diff --git a/actions/unblock.php b/actions/unblock.php index c60458cd3c..0f63e1dae0 100644 --- a/actions/unblock.php +++ b/actions/unblock.php @@ -71,8 +71,17 @@ class UnblockAction extends ProfileFormAction function handlePost() { - $cur = common_current_user(); - $result = $cur->unblock($this->profile); + $cur = common_current_user(); + + $result = false; + + if (Event::handle('StartUnblockProfile', array($cur, $this->profile))) { + $result = $cur->unblock($this->profile); + if ($result) { + Event::handle('EndUnblockProfile', array($cur, $this->profile)); + } + } + if (!$result) { $this->serverError(_('Error removing the block.')); return;