]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/joingroup.php
Switch things from calling Group_member::join & leave & calling events manually to...
[quix0rs-gnu-social.git] / actions / joingroup.php
index 4c45ca8b9ddee3137c61d0564ffc89dc255cc802..8675dbaed3ddcd2f3cd74e493c55bf3976f55a08 100644 (file)
@@ -129,10 +129,7 @@ class JoingroupAction extends Action
         $cur = common_current_user();
 
         try {
-            if (Event::handle('StartJoinGroup', array($this->group, $cur))) {
-                Group_member::join($this->group->id, $cur->id);
-                Event::handle('EndJoinGroup', array($this->group, $cur));
-            }
+            $cur->joinGroup($this->group);
         } catch (Exception $e) {
             // TRANS: Server error displayed when joining a group failed in the database.
             // TRANS: %1$s is the joining user's nickname, $2$s is the group nickname for which the join failed.