X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fleavegroup.php;h=9e560b971721a452b5c7ba668ff682562f8b668b;hb=9d0ccbff01c1d861d152e30feeb2094f5a2742b4;hp=f5d1ccd08ca456e814d108b93958674e2f20eeec;hpb=6c0e43be9eab6fe7ee446b1c54928e13e6e08d85;p=quix0rs-gnu-social.git diff --git a/actions/leavegroup.php b/actions/leavegroup.php index f5d1ccd08c..9e560b9717 100644 --- a/actions/leavegroup.php +++ b/actions/leavegroup.php @@ -123,10 +123,7 @@ class LeavegroupAction extends Action $cur = common_current_user(); try { - if (Event::handle('StartLeaveGroup', array($this->group, $cur))) { - Group_member::leave($this->group->id, $cur->id); - Event::handle('EndLeaveGroup', array($this->group, $cur)); - } + $cur->leaveGroup($this->group); } catch (Exception $e) { // TRANS: Server error displayed when leaving a group failed in the database. // TRANS: %1$s is the leaving user's nickname, $2$s is the group nickname for which the leave failed.