X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Funblock.php;h=0f63e1dae05802c4308f52e7f644d63fb81cbec1;hb=82cac2be595953029e61f2e6f21122206b82314e;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;