X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FForceGroup%2FForceGroupPlugin.php;h=c8e6709fc8534d931f9e8be5569ae4406d1385f7;hb=7dcb27672fa3f234f1fdfab5024752614e805341;hp=fb98644846b8278922a06748cdfb37ab3696ffc2;hpb=707b45097428b0dbcdbf9ae2590129080207f254;p=quix0rs-gnu-social.git diff --git a/plugins/ForceGroup/ForceGroupPlugin.php b/plugins/ForceGroup/ForceGroupPlugin.php index fb98644846..c8e6709fc8 100644 --- a/plugins/ForceGroup/ForceGroupPlugin.php +++ b/plugins/ForceGroup/ForceGroupPlugin.php @@ -33,11 +33,11 @@ class ForceGroupPlugin extends Plugin * List by local nickname. */ public $post = array(); - + /** * New user registrations will automatically join these groups on * registration. They're not prevented from leaving, however. - * + * * List by local nickname. */ public $join = array(); @@ -68,10 +68,7 @@ class ForceGroupPlugin extends Plugin $group = User_group::getForNickname($nickname); if ($group && !$profile->isMember($group)) { try { - if (Event::handle('StartJoinGroup', array($group, $user))) { - Group_member::join($group->id, $user->id); - Event::handle('EndJoinGroup', array($group, $user)); - } + $profile->joinGroup($group); } catch (Exception $e) { // TRANS: Server exception. // TRANS: %1$s is a user nickname, %2$s is a group nickname.