diff options
author | Evan Prodromou <evan@status.net> | 2009-12-28 10:50:12 -0800 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-28 10:50:12 -0800 |
commit | 2ae04bb6d598c74763aca79ab52172934158be46 (patch) | |
tree | d196dfb1fa6abe39ccaeff551f5ffe5f5bf1d804 /actions/unblock.php | |
parent | c5de3262312f814bc44e596d9031c2df22420e27 (diff) |
add events for unblocking a profile
Diffstat (limited to 'actions/unblock.php')
-rw-r--r-- | actions/unblock.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/actions/unblock.php b/actions/unblock.php index c60458cd3..0f63e1dae 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; |